Last active
November 14, 2019 23:53
-
-
Save rudyj03/04a0d3842dfe1def3743404ba118b01f to your computer and use it in GitHub Desktop.
This docker compose file creates an empty Postgres database container and a pgAdmin container. You can connect to the database by specifying "database" as the host name in the pgAdmin UI along with the Postgres credentials listed in this compose file.
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.1' | |
services: | |
postgresql: | |
image: postgres:11-alpine | |
container_name: database | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: test | |
POSTGRES_DB: postgres | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./postgres-data:/var/lib/postgresql/data | |
networks: | |
- db-net | |
pgadmin4: | |
image: dpage/pgadmin4:4.14 | |
container_name: pgadmin | |
environment: | |
PGADMIN_DEFAULT_EMAIL: admin@root.com | |
PGADMIN_DEFAULT_PASSWORD: admin | |
volumes: | |
- ./pgadmin-data:/var/lib/pgadmin | |
ports: | |
- 80:80 | |
networks: | |
- db-net | |
networks: | |
db-net: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment