Created
January 2, 2021 22:38
-
-
Save jadia/c9867942a46630ee4074aad960edd345 to your computer and use it in GitHub Desktop.
Run postgres and pgAdmin on Docker for practice
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' | |
services: | |
postgres: | |
image: postgres | |
hostname: postgres | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
volumes: | |
- postgres-data:/var/lib/postgresql/data | |
restart: unless-stopped | |
pgadmin: | |
image: dpage/pgadmin4 | |
depends_on: | |
- postgres | |
ports: | |
- "5050:80" | |
environment: | |
PGADMIN_DEFAULT_EMAIL: [email protected] | |
PGADMIN_DEFAULT_PASSWORD: admin | |
restart: unless-stopped | |
volumes: | |
postgres-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment