I am currently working on a school project and I need to connect to a PostgreSQL container through pgAdmin. I have used docker-compose to create the container instance of PostgreSQL and PostGIS.
But when I try to connect to my PostgreSQL container, it does not work. Maybe I have entered the details wrongly? I have attached a screenshot here of the docker-compose.yml file and the parameters that I have filled in on my pgAdmin Desktop.
What am I doing wrong?
Can anyone please help me? Would really appreciate it !!
CodePudding user response:
Your db container's outside port is 54320
, not 5432
. You are trying to connect postgis
container instead of postgres
. And your passwords are different from each other.
You can do one of the below;
- If you still want to connect to
postgis
, you can use password accordingly. - If you want to connect to
postgres
, change port to54320
inpgAdmin
.
CodePudding user response:
my netstat output ^