PR DEPLOYMENT
ayebaremathew
PROOP

4 months ago

when ever i deploy a PR it deployed or created with its own db but connected to the production db is URL i want it to deploy automatically while connected to its own PR db URL Why app service points to production db rather than pr db? And it does this auto Nothing in the code tells it to 

we changed the the base environment to no base environment but still the samething

Solved$20 Bounty

Pinned Solution

In project environment settings for PR environments, it states:

Variables from this environment will be used in the PR Environment. If no base environment is defined, the environment connected to the destination branch will be used.

From what I understand, if "No base environment" is selected, it will just use the production environment.

If you don't have a base environment defined, I'd create some sort of staging/pr environment and select it in the PR environments option.

4 Replies

Railway
BOT

4 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


In project environment settings for PR environments, it states:

Variables from this environment will be used in the PR Environment. If no base environment is defined, the environment connected to the destination branch will be used.

From what I understand, if "No base environment" is selected, it will just use the production environment.

If you don't have a base environment defined, I'd create some sort of staging/pr environment and select it in the PR environments option.


0x5b62656e5d

In project environment settings for PR environments, it states:Variables from this environment will be used in the PR Environment. If no base environment is defined, the environment connected to the destination branch will be used.From what I understand, if "No base environment" is selected, it will just use the production environment.If you don't have a base environment defined, I'd create some sort of staging/pr environment and select it in the PR environments option.

ayebaremathew
PROOP

4 months ago

thanks but isn't there another way PR deployments get connected to there databases automatically rather than use a general staging variable


https://docs.railway.com/guides/manage-variables

I'm not too sure about "automatically" but you could set up a Github Action to reconfigure environment variables to something else if that helps


Status changed to Solved chandrika 4 months ago


Loading...