fix: service env parsing

This commit is contained in:
Andras Bacsai
2024-07-26 20:00:37 +02:00
parent 8a4e958663
commit 1d419c6ab8

View File

@@ -1067,6 +1067,12 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
// Get variables from the service
foreach ($serviceVariables as $variableName => $variable) {
if (is_numeric($variableName)) {
if (is_array($variable)) {
// - SESSION_SECRET: 123
// - SESSION_SECRET:
$key = str(collect($variable)->keys()->first());
$value = str(collect($variable)->values()->first());
} else {
$variable = str($variable);
if ($variable->contains('=')) {
// - SESSION_SECRET=123
@@ -1078,6 +1084,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
$key = $variable;
$value = null;
}
}
} else {
// SESSION_SECRET: 123
// SESSION_SECRET: