Skip to content

Instantly share code, notes, and snippets.

@beingsane
Forked from isaqueprofeta/docker-compose.yml
Created April 17, 2020 18:25
Show Gist options
  • Select an option

  • Save beingsane/0607329cb3e8f1186e1275bbae232074 to your computer and use it in GitHub Desktop.

Select an option

Save beingsane/0607329cb3e8f1186e1275bbae232074 to your computer and use it in GitHub Desktop.
Postgres and Pgadmin4 with volumes
version: '2'
volumes:
db_data:
driver: local
pgadmin_data:
driver: local
services:
db:
restart: always
image: postgres
environment:
- POSTGRES_USER=dev
- POSTGRES_PASSWORD=dev
- POSTGRES_DB=dev
ports:
- '5432:5432'
volumes:
- db_data:/var/lib/postgresql/data
pgadmin:
restart: always
image: thajeztah/pgadmin4
ports:
- '5050:5050'
volumes:
- pgadmin_data:/pgadmin
depends_on:
- 'db'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment