Preview deployment where frontend needs a specific URL from backend deployment
cloudycotton
PROOP

9 months ago

I have a monorepo that i want to deploy on each PR with preview environments. The problem is my frontend needs backend url as environment variable that would be another app to deploy. Is there an easy way to do do this with railway that doesn't involve writing a lot of shell scripts in action?

Solved

2 Replies

brody
EMPLOYEE

9 months ago

Hello!

Yes absolutely, you can easily do this with reference variables -

Just build out a URL that references the RAILWAY_PUBLIC_DOMAIN variable -

This would need to be updated on your base environment for the PR environment so that it's carried over every time you open a PR.

In general, It's always best practice to use reference variables for everything where you can, in all environments -

Hope this helps!


brody
EMPLOYEE

9 months ago

!s


Status changed to Solved brody 10 months ago


Loading...