Last active
January 1, 2021 12:39
-
-
Save adamu/e7bab593e4e0f02c5e62634ba0084768 to your computer and use it in GitHub Desktop.
Docker compose file for a simple Postgres server that keeps its state in a Docker volume for persistence between runs.
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
| version: '3.8' | |
| services: | |
| db: | |
| image: postgres | |
| restart: always | |
| ports: | |
| - '5432:5432' | |
| environment: | |
| POSTGRES_PASSWORD: postgres | |
| volumes: | |
| - type: volume | |
| source: postgres_volume | |
| target: /var/lib/postgresql/data | |
| volumes: | |
| postgres_volume: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment