Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: do not overwrite hardcoded variables if they rely on another variable

Andras Bacsai491bb93e9599
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index 8b7422ad44..cf12d11952 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;