Reference variables between services
Just wondering... is it possible to reference a variable on my postgresql service (
DB_HOST
, DB_PORT
...) on my other web service variables?
like: ${{ DB_HOST }}13 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
other variables arent
Well, it didnt.
did u make the databases after you already deployed ur other web service
had to configure it myself, it didnt detect my .env file on my project either
no
atleast this was simple to do, just copy/pasted it into the raw editor
but the question remains, can I reference my service host variable on my web service variables?
what db is this
postgres
railway doesn't have these env vars
where did u get this Postgres from
did u deploy it urself
no, it was just an example
if i were to reference it in another service
then this answers your question
Ok, thanks.
For anyone finding this thread :
You can use database variables on other services, but not other vars.
.