Created
May 10, 2020 21:18
-
-
Save Qarun-Qadir-Bissoondial/1fd700daad99df7a50692336e6106aeb to your computer and use it in GitHub Desktop.
Docker compose file for spinning up a local Postgres instance
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.5' | |
services: | |
postgres: | |
image: postgres:12.2-alpine | |
environment: | |
POSTGRES_USER: ${POSTGRES_USER:-postgres} | |
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} | |
POSTGRES_DB: postgres | |
PGDATA: /data/postgres | |
volumes: | |
- postgres:/data/postgres | |
ports: | |
- "5432:5432" | |
networks: | |
- postgres | |
restart: unless-stopped | |
pgadmin: | |
image: dpage/pgadmin4:4.21 | |
environment: | |
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org} | |
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} | |
volumes: | |
- pgadmin:/root/.pgadmin | |
ports: | |
- "5050:80" | |
networks: | |
- postgres | |
depends_on: | |
- 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