mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 21:18:11 -04:00
fix(storage): require deploy permission for external host writes
Require deploy or root token access when creating managed mounts outside resource directories or changing their file contents through the API. Synchronize KeyDB and Dragonfly passwords with local and shared REDIS_PASSWORD values while preserving secret manager resolution.
This commit is contained in:
@@ -356,3 +356,24 @@ test('the Compose deployment validates the repository file before any command us
|
||||
->and($loadPosition)->toBeLessThan(strpos($body, 'base64 -d'))
|
||||
->and($body)->toContain('"stat -c \'%F\' ".escapeshellarg($realPathInGit)');
|
||||
});
|
||||
|
||||
test('loading a Compose file with a variable service network saves it', function () {
|
||||
$compose = "services:\n web:\n image: nginx\n networks:\n - \${NET:-proxy}\nnetworks:\n proxy:\n external: true\n";
|
||||
fakeRepositoryCompose($compose);
|
||||
|
||||
$this->application->loadComposeFile();
|
||||
|
||||
expect($this->application->fresh()->docker_compose_raw)->toBe(trim($compose));
|
||||
});
|
||||
|
||||
test('the deployment log names the service and network that failed validation', function () {
|
||||
fakeRepositoryCompose("services:\n web:\n image: nginx\n networks:\n - '\$(id)'\n");
|
||||
$logEntries = [];
|
||||
$job = composeDeploymentJob($this->application, 0, $logEntries);
|
||||
|
||||
expect(fn () => (new ReflectionMethod(ApplicationDeploymentJob::class, 'loadComposeFileForDeployment'))->invoke($job))
|
||||
->toThrow(DeploymentException::class);
|
||||
|
||||
expect(collect($logEntries)->pluck(0)->implode("\n"))
|
||||
->toContain('Invalid Docker Compose service network "$(id)" in service web.');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user