We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f0b2f6e + feadc60 commit 8335c29Copy full SHA for 8335c29
app/Models/Service.php
@@ -841,7 +841,12 @@ public function saveComposeConfigs()
841
$json = Yaml::parse($this->docker_compose);
842
$envs_from_coolify = $this->environment_variables()->get();
843
foreach ($json['services'] as $service => $config) {
844
- $envs = collect($config['environment']);
+ if (data_get($config, 'environment') === null) {
845
+ data_set($json, "services.$service.environment", []);
846
+ $envs = collect([]);
847
+ } else {
848
+ $envs = collect($config['environment']);
849
+ }
850
$envs->put('COOLIFY_CONTAINER_NAME', "$service-{$this->uuid}");
851
foreach ($envs_from_coolify as $env) {
852
$envs = $envs->map(function ($value) use ($env) {
0 commit comments