[Enhancement]: allow using pr_id as a Preview Deployments Environment Variables #4757
Replies: 13 comments 8 replies
-
|
Any update on this one!? 🙏 |
Beta Was this translation helpful? Give feedback.
-
|
Would like to see that! |
Beta Was this translation helpful? Give feedback.
-
|
Hello, |
Beta Was this translation helpful? Give feedback.
-
|
I worked for a while trying to get preview branches to work. It seems like this feature is not really ready unless you have a pretty simple setup. A docker-compose with multiple containers and a tightly coupled DB that needs isolation in PR environment doesn't seem feasible yet. |
Beta Was this translation helpful? Give feedback.
-
|
This would be a great! Makes syncing two preview apps in a monorepo so much simpler. |
Beta Was this translation helpful? Give feedback.
-
|
Upvoting this! ⬆️ |
Beta Was this translation helpful? Give feedback.
-
|
Upvoting this too. It would be a great enhancement ! |
Beta Was this translation helpful? Give feedback.
-
|
if someone wants to test, try add the following (it has to start with COOLIFY): if ($this->application->environment_variables_preview->where('key', 'COOLIFY_PR_ID')->isEmpty()) {
$coolify_envs->put('COOLIFY_PR_ID', $this->pull_request_id);
}to here coolify/app/Jobs/ApplicationDeploymentJob.php Lines 1621 to 1647 in 723f14e |
Beta Was this translation helpful? Give feedback.
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
any status on this? |
Beta Was this translation helpful? Give feedback.
-
|
+1 Would really love to see this feature. Otherwise, it is very hard to use preview deployments. |
Beta Was this translation helpful? Give feedback.
-
|
What's the usecase / reason that the PR ID is needed as a env variable? If it's to pass the URL of a preview deployment, you can use Coolifys Predefined environment variables. For Applications that will be |
Beta Was this translation helpful? Give feedback.
-
|
Bump |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Request Type
Improvement
Description
this will help linking the backend and frontend apps.

example:
where $pr_id is representing the current pr_id
Beta Was this translation helpful? Give feedback.
All reactions