Skip to content

Instantly share code, notes, and snippets.

@duanyrf
Created January 31, 2023 19:33
Show Gist options
  • Save duanyrf/657b5357ef199bdb75f47d505255f82e to your computer and use it in GitHub Desktop.
Save duanyrf/657b5357ef199bdb75f47d505255f82e to your computer and use it in GitHub Desktop.
Docker compose (version 2) for Postgres database with local volume defined
services:
db:
image: postgres
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
POSTGRES_DB: ovisionweb
volumes:
- ./db-data/postgres:/var/lib/postgresql/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment