Railway postgres env is quite different from what I intend to use as per my company styleguide
Hello
I noticed that with Railway postgres we have envs like
PGHOST
PGPORT
. Is there a way to change it to something like POSTGRES_HOST
and so on.
Of course I could just reassign the envs but this won't work for PR builds10 Replies
Project ID:
N/A
N/A
⚠️ experimental feature
Because of that I'm having to do this
Which is really bad. It does not make my code platform agnostic
Any helpers here. it's a huge blocker because I have to remove the implementation above. Thank you
Well, postgres generally uses the
PG<whatever>
variables as a standard, so you should probably use those. However, you can add variables to the Environment Variables tab of your Railway services to fix it.
e.g.:
That's easier than I thought! I'd try it out
${PGHOST}
as a string should get the right value yeah?It should, if I recall correctly.
THANK YOU @Brody @aleks