I am trying to connect my local postgres database using pgAdmin4 docker container. When I open http://localhost:5050/
and login after create new server connection I got Unable to connect to server: could not connect to server: Connection refused
error message.
Here is my docker-compose.yml
file
version: '3.5'
services:
pgadmin:
container_name: pgadmin4
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: db@db.com
PGADMIN_DEFAULT_PASSWORD: odoo
volumes:
- pgadmin:/root/.pgadmin
ports:
- "5050:80"
restart: unless-stopped
volumes:
pgadmin:
I am finding solution to connect my local postgres databasw with pgadmin4 docker container. I am using Ubuntu 20.04 os system.
---- Updated base on @Veikko answer -----------
Here is my docker-compose file code https://pastebin.com/VmhZwtaL
and here is postgresql.conf file https://pastebin.com/R7ifFrGR
and pg_hba.conf file https://pastebin.com/yC2zCfBG