7 months ago
Not exactly a railway specific question, but I was following the tutorial specific to railway here: https://www.youtube.com/watch?v=oitx514tQgk
I see that in his nginx.conf file, he hard codes the url of his two apis.
I would like to have this based off a variable, since I have multiple environments (dev, staging, prod). I am curious if anyone has any solid solutions for this. Nginx environment variables seem like a possible solution, but seem maybe overly complicated? Not sure if there is an easier solution. Thanks for any help.
0 Replies
7 months ago
one of the main reasons I dislike nginx is because there is no environment variable syntax, would you be opposed to using caddy instead?
otherwise you'll have to run the config file through a pre-processor
not opposed, i was just curious if there was a simple solution with nginx first. If you don't think there is, then I'll probably just look to copy your Caddy/React template 🙂
or I assume this: https://github.com/railwayapp-templates/caddy-reverse-proxy
7 months ago
updated my my message above 🙂
7 months ago
no problem!
7 months ago
!s
Status changed to Solved brody • 7 months ago