Skip to content

Instantly share code, notes, and snippets.

@youngsoul
Created August 22, 2021 19:56
Show Gist options
  • Select an option

  • Save youngsoul/eed6622d385da31c160498310a870227 to your computer and use it in GitHub Desktop.

Select an option

Save youngsoul/eed6622d385da31c160498310a870227 to your computer and use it in GitHub Desktop.
Example docker-compose.yml to run postgres 12.2
version: '3.3'
services:
db:
image: postgres:12.2
container_name: 'postgres-container'
labels:
application: 'postgres-db'
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "devdb"
ports:
- "5432:5432"
expose:
- "5432"
volumes:
postgres_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment