7 months ago
I'm trying to connect my Django deployment to a postgres using private networking. I copied the path for the private address and now my deployment crashes:
django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: Name or service not know
What am I doing wrong?
4 Replies
7 months ago
I should mention it works when using the public url but would like to avoid that because of egress traffic.
7 months ago
Hello,
Postgres needs to be in the same environment -
https://docs.railway.com/overview/best-practices#deploying-related-services-into-the-same-project
Status changed to Awaiting User Response Railway • 7 months ago
7 months ago
Oh that fixed it. I hadn't found that document. I didn't actually know that you could have multiple services within a project. I thought they had to be separate. So this made life easier.
Thanks
Status changed to Awaiting Railway Response Railway • 7 months ago
Status changed to Awaiting User Response Railway • 7 months ago
Status changed to Solved brody • 7 months ago