mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
fix
This commit is contained in:
parent
eece96e717
commit
2a9a2dd7c4
@ -2113,10 +2113,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
return collect([]);
|
return collect([]);
|
||||||
}
|
}
|
||||||
} elseif ($resource->getMorphClass() === 'App\Models\Application') {
|
} elseif ($resource->getMorphClass() === 'App\Models\Application') {
|
||||||
$isSameDockerComposeFile = false;
|
|
||||||
if ($resource->dockerComposePrLocation() === $resource->dockerComposeLocation()) {
|
|
||||||
$isSameDockerComposeFile = true;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
$yaml = Yaml::parse($resource->docker_compose_raw);
|
$yaml = Yaml::parse($resource->docker_compose_raw);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@ -2831,13 +2827,8 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
'configs' => $topLevelConfigs->toArray(),
|
'configs' => $topLevelConfigs->toArray(),
|
||||||
'secrets' => $topLevelSecrets->toArray(),
|
'secrets' => $topLevelSecrets->toArray(),
|
||||||
];
|
];
|
||||||
if ($isSameDockerComposeFile) {
|
|
||||||
$resource->docker_compose_raw = Yaml::dump($yaml, 10, 2);
|
$resource->docker_compose_raw = Yaml::dump($yaml, 10, 2);
|
||||||
$resource->docker_compose = Yaml::dump($finalServices, 10, 2);
|
$resource->docker_compose = Yaml::dump($finalServices, 10, 2);
|
||||||
} else {
|
|
||||||
$resource->docker_compose_raw = Yaml::dump($yaml, 10, 2);
|
|
||||||
$resource->docker_compose = Yaml::dump($finalServices, 10, 2);
|
|
||||||
}
|
|
||||||
$resource->save();
|
$resource->save();
|
||||||
|
|
||||||
return collect($finalServices);
|
return collect($finalServices);
|
||||||
|
Loading…
Reference in New Issue
Block a user