Created
August 10, 2020 07:51
-
-
Save yogendratamang48/687690a295b4e771e4848a5f53af05cf to your computer and use it in GitHub Desktop.
Postgres docker compose
This file contains 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" | |
services: | |
database: | |
image: "postgres:10" # use latest official postgres version | |
env_file: | |
- database.env # configure postgres | |
ports: | |
- "5432:5432" | |
volumes: | |
- database-data:/var/lib/postgresql/data/ # persist data even if container shuts downvolumes: | |
volumes: | |
database-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure to add database.env file like this