fix: env value generation

This commit is contained in:
Andras Bacsai
2024-03-04 08:49:53 +01:00
parent 112c259d27
commit f7e1ce8656
5 changed files with 8 additions and 5 deletions

View File

@@ -1405,7 +1405,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
]);
}
} else {
$generatedValue = generateEnvValue($command, $service);
$generatedValue = generateEnvValue($command);
if (!$foundEnv) {
EnvironmentVariable::create([
'key' => $key,
@@ -1581,7 +1581,7 @@ function parseEnvVariable(Str|string $value)
'port' => $port,
];
}
function generateEnvValue(string $command, Service $service)
function generateEnvValue(string $command, ?Service $service = null)
{
switch ($command) {
case 'PASSWORD':