Feature request: PR Environment template configuration
mcky
PROOP

a month ago

We utilise preview environments which are all forked from our staging environment, but this means they inherit all of staging's environment variables

We'd like to be able to set env variable overrides across all PR environments, for example sending analytics and logs to a different endpoint. Railway's handling of shared environment variables is pretty good, this just feels like a slight omission

A workaround we're considering is to create a preview-base environment, which we keep synced with staging but maintain the overrides there, and set that as the base for preview environments to branch from

Another alternative I'd rather avoid is a custom deploy script for PR environments in railway.toml, for example


[deploy]

startCommand = "npm start"

[environments.pr.deploy]

startCommand = "VAR=$PR_VAR npm start"
Under Review

0 Threads mention this feature

0 Replies

Welcome!

Sign in to your Railway account to join the conversation.

Loading...