From 491bb93e95997079d8f72fcf95b3145cb0136376 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 10 Jul 2024 15:53:46 +0200 Subject: [PATCH] fix: do not overwrite hardcoded variables if they rely on another variable --- bootstrap/helpers/shared.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 8b7422ad4..cf12d1195 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -1384,9 +1384,11 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal } $parsedServiceVariables->put('COOLIFY_CONTAINER_NAME', "$serviceName-{$resource->uuid}"); $parsedServiceVariables = $parsedServiceVariables->map(function ($value, $key) use ($envs_from_coolify) { - $found_env = $envs_from_coolify->where('key', $key)->first(); - if ($found_env) { - return $found_env->value; + if (! str($value)->startsWith('$')) { + $found_env = $envs_from_coolify->where('key', $key)->first(); + if ($found_env) { + return $found_env->value; + } } return $value;