Skip to content

Instantly share code, notes, and snippets.

@isaqueprofeta
Last active April 17, 2020 18:25
Show Gist options
  • Save isaqueprofeta/a667fda1b93f1f861a26826782905991 to your computer and use it in GitHub Desktop.
Save isaqueprofeta/a667fda1b93f1f861a26826782905991 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