Last active
April 17, 2024 13:31
-
-
Save pingkunga/0fa9bdaff6ac560a99b5d0e5ba68dca6 to your computer and use it in GitHub Desktop.
docker compose for PostgreSQL and PGAdmin
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
version: "3.8" | |
services: | |
db: | |
image: postgres | |
container_name: local_pgdb | |
restart: always | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_USER: your-username | |
POSTGRES_PASSWORD: your-strong-password | |
volumes: | |
- local_pgdata:/var/lib/postgresql/data | |
pgadmin: | |
image: dpage/pgadmin4 | |
container_name: local_pgadmin4 | |
restart: always | |
ports: | |
- "5050:80" | |
environment: | |
PGADMIN_DEFAULT_EMAIL: your-email | |
PGADMIN_DEFAULT_PASSWORD: your-strong-password | |
volumes: | |
- local_pgadmindata:/var/lib/pgadmin | |
volumes: | |
local_pgdata: | |
local_pgadmindata: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment