Created
January 30, 2021 09:09
-
-
Save neibla/9108b711d1e26f4ffc571b6e659e9722 to your computer and use it in GitHub Desktop.
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.7" | |
services: | |
database: | |
image: "postgres:13.1" | |
environment: | |
POSTGRES_PASSWORD: "password" | |
# env_file: | |
# - database.env # configure postgres | |
volumes: | |
- database-data:/var/lib/postgresql/data/ | |
# if we wanted stored on host machine: | |
# - ./db_data/:/var/lib/postgresql/data/ | |
ports: | |
- "5432:5432" | |
volumes: | |
database-data: | |
# docker-compose up -d | |
#PGPASSWORD=password psql -h localhost -p 5432 -U postgres | |
# destroy data | |
# docker-compose down --volumes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment