Skip to content

Instantly share code, notes, and snippets.

@WebDevEtc
Created September 27, 2021 19:48
Show Gist options
  • Save WebDevEtc/3c5d1c8c76630b8953424758e210746a to your computer and use it in GitHub Desktop.
Save WebDevEtc/3c5d1c8c76630b8953424758e210746a to your computer and use it in GitHub Desktop.
docker-compose.yml for running postgres
version: '3.8'
services:
database:
image: postgres
restart: unless-stopped
container_name: database
environment:
POSTGRES_PASSWORD: secret123
POSTGRES_DB: dbname
volumes:
- ./postgresql-data:/var/lib/postgresql/data
ports:
- '5432:5432'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment