Last active
June 12, 2022 21:09
-
-
Save yduman/e8d3035880a3000619acc0e708b236ac 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
version: "3.8" | |
services: | |
db: | |
container_name: my-pg-container | |
image: postgres | |
restart: always | |
ports: | |
- "5432:5432" | |
environment: | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=postgres | |
- POSTGRES_DB=my-db | |
volumes: | |
- postgresdata:/var/lib/postgresql/data | |
networks: | |
- pgnetwork | |
pgadmin: | |
container_name: my-pgadmin | |
image: dpage/pgadmin4 | |
restart: always | |
ports: | |
- "5050:80" | |
environment: | |
- [email protected] | |
- PGADMIN_DEFAULT_PASSWORD=test | |
volumes: | |
- pgadmindata:/var/lib/pgadmin | |
networks: | |
- pgnetwork | |
volumes: | |
postgresdata: | |
pgadmindata: | |
networks: | |
pgnetwork: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment