pgAdmin is a web-based PostgreSQL database management tool. To run it in Docker Compose, add the following snippet to your docker-compose.yml
:
pgadmin:
image: "dpage/pgadmin4:latest"
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: password
PGADMIN_LISTEN_ADDRESS: "127.0.0.1"
PGADMIN_LISTEN_PORT: 5050
network_mode: host
- Replace
latest
with a version number that is compatible with your Postgres version, e.g.6.12
.