Saturday, October 31, 2020

Newbie looking for some help with Postgres <> Django connection

Hi All,

I'm looking for tips/resources for a problem I'm facing with my Django app:

I'm attempting to connect my Dockerized Django app with a PostgreSQL db. The postgres db is already populated, and I can access the data via pgadmin, but I cannot figure out the appropriate settings in my docker-compose.yml & files to make the postgres db populate my django app.

I've reviewed multiple tutorials/blog posts, including Will Vincents Docker & PostgreSQL tutorial, but I feel like I'm missing one or two final & crucial steps. 

When I change my DB settings for Postgres, & I bring up the app via Docker, I continue running into this OperationalError: 

message:django.db.utils.OperationalError: could not connect to server: Connection refused
Is the server running on host "db" ( and accepting
TCP/IP connections on port 5433?

Any tips/resources/feedback would be greatly appreciated. Thanks in advance.


You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment