Skip to content

Instantly share code, notes, and snippets.

@mebaysan
Last active September 8, 2022 17:25
Show Gist options
  • Save mebaysan/fef3362da6e7aab3896fde550c7b7d63 to your computer and use it in GitHub Desktop.
Save mebaysan/fef3362da6e7aab3896fde550c7b7d63 to your computer and use it in GitHub Desktop.
PgAdmin & Postgres
version: "3.9"
services:
db:
image: postgres
container_name: dwh-db
restart: unless-stopped
ports:
- "5432:5432"
networks:
- dwh-network
volumes:
- db_volume:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=Passw0rd!.
dbms:
# you can use `docker inspect <db_container_ID> | grep IPAddress` to register the db to the dbms service in PgAdmin console
# or you can set `host.docker.internal` for connection host on pgAdmin
image: dpage/pgadmin4
container_name: dwh-dbms
restart: unless-stopped
ports:
- "5435:5435"
networks:
- dwh-network
environment:
- PGADMIN_LISTEN_PORT=5435
- PGADMIN_DEFAULT_PASSWORD=Passw0rd!.
- [email protected]
volumes:
db_volume:
networks:
dwh-network:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment