Skip to content

Instantly share code, notes, and snippets.

@jadia
Created January 2, 2021 22:38
Show Gist options
  • Save jadia/c9867942a46630ee4074aad960edd345 to your computer and use it in GitHub Desktop.
Save jadia/c9867942a46630ee4074aad960edd345 to your computer and use it in GitHub Desktop.
Run postgres and pgAdmin on Docker for practice
version: '3'
services:
postgres:
image: postgres
hostname: postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
pgadmin:
image: dpage/pgadmin4
depends_on:
- postgres
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: admin
restart: unless-stopped
volumes:
postgres-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment