Fix environment variable parsing in Docker Compose file
This commit is contained in:
parent
335788c2d6
commit
12d9b6538b
@ -1275,13 +1275,18 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
continue;
|
||||
}
|
||||
if ($value?->startsWith('$')) {
|
||||
$value = Str::of(replaceVariables($value));
|
||||
$key = $value;
|
||||
$foundEnv = EnvironmentVariable::where([
|
||||
'key' => $key,
|
||||
'application_id' => $resource->id,
|
||||
'service_id' => $resource->id,
|
||||
])->first();
|
||||
$value = Str::of(replaceVariables($value));
|
||||
$key = $value;
|
||||
|
||||
if ($value->startsWith('SERVICE_')) {
|
||||
$foundEnv = EnvironmentVariable::where([
|
||||
'key' => $key,
|
||||
'application_id' => $resource->id,
|
||||
])->first();
|
||||
['command' => $command, 'forService' => $forService, 'generatedValue' => $generatedValue, 'port' => $port] = parseEnvVariable($value);
|
||||
if ($command->value() === 'FQDN' || $command->value() === 'URL') {
|
||||
if (Str::lower($forService) === $serviceName) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user