Created
June 13, 2020 13:43
-
-
Save oxlb/80181c69334e911fb69a35436ff972e3 to your computer and use it in GitHub Desktop.
Postgres Docker Multiple Database
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.6' | |
services: | |
postgres: | |
image: postgres | |
restart: always | |
environment: | |
- DATABASE_HOST=127.0.0.1 | |
- POSTGRES_USER=root | |
- POSTGRES_PASSWORD=root | |
- POSTGRES_DB=root | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql | |
pgadmin-compose: | |
image: dpage/pgadmin4 | |
environment: | |
PGADMIN_DEFAULT_EMAIL: "[email protected]" | |
PGADMIN_DEFAULT_PASSWORD: "test123!" | |
ports: | |
- "16543:80" | |
depends_on: | |
- postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment