I'm running pgAdmin in a docker container, trying to connect to Postgres running locally on my machine. No matter what IP address I enter, it gives an error saying :
"Unable to connect to server:
could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?"
My server is indeed running, and it is allowing external addresses (listen_addresses = '*').
I guess I'm just not using the correct IP address. What is the correct address I should use?
Here is my docker compose code:
version: '3'
services:
  pgadmin:
    image: dpage/pgadmin4
    ports:
      - "5000:80"
    environment:
      PGADMIN_DEFAULT_EMAIL: me@me.com
      PGADMIN_DEFAULT_PASSWORD: admin
      network_mode: host
  
restart: unless-stopped
 
    