RAILWAY_{serviceName}_STATIC_URL not working

I have an nginx container proxying to an application container and am trying to reference the application container url. The application container is named 'frontend' so I set an env variable equal to ${{RAILWAY_FRONTEND_STATIC_URL}} but it's coming through blank. What am I doing wrong here? product id: f44954e4-11aa-4f45-9e1a-302641b5dc42 using the 'separate-nginx' environment
Solution:
there's no need to set any variables yourself, just simply use RAILWAY_SERVICE_FRONTEND_URL assuming your frontend service is named "frontend"...
Jump to solution
10 Replies
Percy
Percy2y ago
Project ID: f44954e4-11aa-4f45-9e1a-302641b5dc42
Solution
Brody
Brody2y ago
there's no need to set any variables yourself, just simply use RAILWAY_SERVICE_FRONTEND_URL assuming your frontend service is named "frontend"
eggsovereasy
eggsovereasyOP2y ago
yes it is
Brody
Brody2y ago
this variable is created by railway, there's no need to add it yourself
eggsovereasy
eggsovereasyOP2y ago
I made the intermediate variable just so i could quickly change values in railway and redeploy without having to do git commits and run it through that way. I have also tried without my own variable and it also did not work
Brody
Brody2y ago
show me where you are using the variable
eggsovereasy
eggsovereasyOP2y ago
nevermind, i just tried that again and it worked this time, maybe i had a typo the first time thank you
Brody
Brody2y ago
haha no problem, another day another typo
eggsovereasy
eggsovereasyOP2y ago
subquestion, if i name the service with a . in it do i just make that period an _ in the env var name, so site.com because RAILWAY_SITE_COM_STATIC_URL ?
Brody
Brody2y ago
correct spaces, periods, commas, etc, all get normalized to a underscore and apha chars are always going to be uppercase
Want results from more Discord servers?
Add your server