Merge pull request #2670 from coollabsio/next

fix fix fix
This commit is contained in:
Andras Bacsai 2024-06-24 21:00:03 +02:00 committed by GitHub
commit 8335c299b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -841,7 +841,12 @@ public function saveComposeConfigs()
$json = Yaml::parse($this->docker_compose);
$envs_from_coolify = $this->environment_variables()->get();
foreach ($json['services'] as $service => $config) {
$envs = collect($config['environment']);
if (data_get($config, 'environment') === null) {
data_set($json, "services.$service.environment", []);
$envs = collect([]);
} else {
$envs = collect($config['environment']);
}
$envs->put('COOLIFY_CONTAINER_NAME', "$service-{$this->uuid}");
foreach ($envs_from_coolify as $env) {
$envs = $envs->map(function ($value) use ($env) {