a year ago
Hi folks, i'm just trying to start a deployment using docker-compose (awesopme work on adding this btw). I need to add varibles PGHOST, PGPORT, PGUSER………, where do i obtain this once the Postgres service is built? Just confused on how to handle connecting Db with compose.
project id c09e5027-23b0-4a6d-a30f-924d3bb5cef4
15 Replies
a year ago
PGHOST=${{RAILWAY_PRIVATE_DOMAIN}}
PGPORT=5432
PGUSER=Ok cool. Postgres deployed but i get
`django.db.utils.OperationalError: could not translate host name "
postgres" to address: Name or service not known
`
In Django. hmmmm….env's are correct from what i can see in django.
a year ago
Is postgres the correct private domain name?
a year ago
is Postgres in the same project?
a year ago
Is the error during build or runtime?
a year ago
I think it would be best for you to use the Postgres Railway template instead of the insecure Postgres deployment you have made
a year ago
yeah best to use Railway primitives
Yea ok cool. Django/Postgres can build via template and I can use compose for other service reliant on an image, which was working OK.
Cheers Brody for advice as always.
a year ago
no problem!
a year ago
!s
Status changed to Solved brody • about 1 year ago