Created
June 16, 2023 01:29
-
-
Save frankie7413/2f1fbec592885316f15e341853b0fb8f to your computer and use it in GitHub Desktop.
Postgres & Pgadmin container set up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://belowthemalt.com/2021/06/09/run-postgresql-and-pgadmin-in-docker-for-local-development-using-docker-compose/ | |
services: | |
db: | |
image: postgres:11.6 | |
restart: always | |
ports: | |
- "5432:5432" | |
environment: | |
- POSTGRES_USER=user | |
- POSTGRES_PASSWORD=password123 | |
volumes: | |
- pgdata:/var/lib/postgresql/data | |
pgadmin: | |
image: dpage/pgadmin4 | |
container_name: pgadmin4_container | |
restart: always | |
ports: | |
- "5050:80" | |
environment: | |
- [email protected] | |
- PGADMIN_DEFAULT_PASSWORD=root | |
volumes: | |
- pgadmin-data:/var/lib/pgadmin | |
volumes: | |
pgdata: | |
pgadmin-data: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment