Error Message and Logs
$COOLIFY_BRANCH behaves inconsistently between setting dynamic env variables and what's actually passed to container.
In ApplicationDeploymentJob it's set to $this->application->git_branch while bootstrap/helps/parser.php set's it to "pull/{$pullRequestId}/head"
Steps to Reproduce
- Create new app with preview deployment enabled
- Edit environmental variables and set (for preview)
TEST=${COOLIFY_BRANCH} - this will be set to actual git branch
- Deploy preview instance from any branch
- Open deployed container and
echo $COOLIFY_BRANCH - this will be set to "pull/PULL_REQUEST_ID/head"
Example Repository URL
No response
Coolify Version
v4.0.0-beta.473
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04.4 LTS
Additional Information
I have in my app set (in preview ENV) DATABASE_URL to postgres://xyz/app_${COOLIFY_BRANCH}, this is what I'm seeing after entering the container: https://shots.hmdr.io/rSxTql8Z
Error Message and Logs
$COOLIFY_BRANCH behaves inconsistently between setting dynamic env variables and what's actually passed to container.
In ApplicationDeploymentJob it's set to
$this->application->git_branchwhile bootstrap/helps/parser.php set's it to"pull/{$pullRequestId}/head"Steps to Reproduce
TEST=${COOLIFY_BRANCH}- this will be set to actual git branchecho $COOLIFY_BRANCH- this will be set to"pull/PULL_REQUEST_ID/head"Example Repository URL
No response
Coolify Version
v4.0.0-beta.473
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04.4 LTS
Additional Information
I have in my app set (in preview ENV) DATABASE_URL to
postgres://xyz/app_${COOLIFY_BRANCH}, this is what I'm seeing after entering the container: https://shots.hmdr.io/rSxTql8Z