Created
January 2, 2026 11:38
-
-
Save 0xAungkon/d4aae379e8d3575975c2c56cd1ee672f to your computer and use it in GitHub Desktop.
postgresql docker compose
This file contains hidden or 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
| services: | |
| psql_db: | |
| user: root | |
| container_name: psql_db | |
| image: postgres | |
| restart: on-failure | |
| # set shared memory limit when using docker-compose | |
| shm_size: 128mb | |
| # or set shared memory limit when deploy via swarm stack | |
| environment: | |
| POSTGRES_PASSWORD: GHUsEQUeTIet | |
| volumes: | |
| - psql-data:/var/lib/postgresql/data | |
| ports: | |
| - "5432:5432" | |
| psql_db_admin: | |
| image: dpage/pgadmin4 | |
| container_name: psql_db_admin | |
| user: root | |
| ports: | |
| - "8085:80" | |
| environment: | |
| PGADMIN_DEFAULT_EMAIL: admin@example.com | |
| PGADMIN_DEFAULT_PASSWORD: GHUsEQUeTIet | |
| restart: on-failure | |
| volumes: | |
| - pgadmin_data:/var/lib/pgadmin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment