A Seperate Shared Variables for PR Environments
Anonymous

3 years ago

Shared variables are great. However, my service had to manually change some variables every time the PR environment was created.

For example, in production and dev environments, our Nuxt.js application listens for a site_domain environment variable. This variable is our domain name (e.g. example.com/dev.example.com). The PR environments created based on these services will use the same domain name, which leads to cross-domain issues and other domain-related problems.

In a PR environment, sitedomain should be set to RAILWAYSTATIC_URL in our case, but we have not found a way to do this automatically.

Another solution would be to provide an additional Railway-Provided Variables, which may be called RAILWAYPRIMARYDOMAIN. This variable could be provided automatically when the user sets custom domains, but this would reqire an additional "primary domain setting" when setting the domain name. And, it is not universal enough.

Image is only a concept.

0 Replies

Loading...