Created
April 2, 2018 16:22
-
-
Save adrianolsk/5d206d7b43ed6e73aa8ebb340a03e6c6 to your computer and use it in GitHub Desktop.
Create a Postgres docker container
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
PostgreSQL: | |
restart: always | |
image: postgres:9.6-alpine | |
container_name: postgres | |
ports: | |
- "5432:5432" | |
environment: | |
- DEBUG=false | |
- POSTGRES_USER=postgres_or_another | |
- POSTGRES_PASSWORD=something_secure | |
- POSTGRES_DB=your_database_name_here | |
volumes: | |
- ./data:/var/lib/postgresql/data | |
# How to run | |
# docker-compose up -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment