Last active
February 17, 2023 20:38
-
-
Save thiagozs/14a1c76b67eb78c3d1e36dc26b6af301 to your computer and use it in GitHub Desktop.
Docker Compose postgre 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.9' | |
services: | |
postgres: | |
container_name: postgres | |
image: postgres | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: secret | |
PGDATA: /data/postgres | |
volumes: | |
- postgres:/data/postgres | |
ports: | |
- "5432:5432" | |
networks: | |
- postgres | |
restart: unless-stopped | |
pgadmin: | |
container_name: pgadmin | |
image: dpage/pgadmin4 | |
environment: | |
PGADMIN_DEFAULT_EMAIL: pgadmin4@pgadmin.org | |
PGADMIN_DEFAULT_PASSWORD: admin | |
PGADMIN_CONFIG_SERVER_MODE: 'False' | |
volumes: | |
- pgadmin:/var/lib/pgadmin | |
ports: | |
- "5050:80" | |
networks: | |
- postgres | |
restart: unless-stopped | |
networks: | |
postgres: | |
driver: bridge | |
volumes: | |
postgres: | |
pgadmin: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment