fix
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user