R
Railway3y ago
Medim

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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
eirk
eirk3y ago
other variables arent
Medim
MedimOP3y ago
Well, it didnt.
eirk
eirk3y ago
did u make the databases after you already deployed ur other web service
Medim
MedimOP3y ago
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?
eirk
eirk3y ago
what db is this
Medim
MedimOP3y ago
postgres
eirk
eirk3y ago
railway doesn't have these env vars where did u get this Postgres from did u deploy it urself
Medim
MedimOP3y ago
no, it was just an example if i were to reference it in another service
eirk
eirk3y ago
then this answers your question
Medim
MedimOP3y ago
Ok, thanks. For anyone finding this thread : You can use database variables on other services, but not other vars.
eirk
eirk3y ago
.
Want results from more Discord servers?
Add your server