Skip to content

Instantly share code, notes, and snippets.

@marcominerva
Created June 12, 2024 14:24
Show Gist options
  • Save marcominerva/775743e14519a496c8472abc61818781 to your computer and use it in GitHub Desktop.
Save marcominerva/775743e14519a496c8472abc61818781 to your computer and use it in GitHub Desktop.
Create a PostgreSQL container with pgAdmin
version: "3.8"
services:
db:
image: postgres
container_name: local_pgdb
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_USER: pi
POSTGRES_PASSWORD: pi4dev
volumes:
- local_pgdata:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin4_container
restart: unless-stopped
ports:
- "8888:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: pi4dev
volumes:
- pgadmin-data:/var/lib/pgadmin
volumes:
local_pgdata:
pgadmin-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment