Created
January 31, 2023 19:33
-
-
Save duanyrf/657b5357ef199bdb75f47d505255f82e to your computer and use it in GitHub Desktop.
Docker compose (version 2) for Postgres database with local volume defined
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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