Skip to content

Instantly share code, notes, and snippets.

@with-shrey
Last active November 4, 2023 11:26
Show Gist options
  • Save with-shrey/b8bccae44f8b72d8fd13d5ded55f300e to your computer and use it in GitHub Desktop.
Save with-shrey/b8bccae44f8b72d8fd13d5ded55f300e to your computer and use it in GitHub Desktop.
Docker configuration to run latest PostgreSQL instance quickly
version: '3'
services:
postgres:
image: postgres:latest
container_name: my-postgres-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin4_container
restart: always
ports:
- "8888:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: postgres
volumes:
- pgadmin-data:/var/lib/pgadmin
volumes:
postgres_data:
pgadmin-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment