Created
October 29, 2019 16:10
-
-
Save niomwungeri-fabrice/0d0cc11fa0f934c68eb0e27dcd3ca97f to your computer and use it in GitHub Desktop.
Docker-compose config for Python 3 and Django
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: | |
web: | |
build: . | |
command: > | |
sh -c "python manage.py migrate && | |
python manage.py runserver 0.0.0.0:8000" | |
environment: | |
- DB_HOST=db | |
- DB_NAME=postgres | |
- DB_USER=postgres | |
- DB_PASS=postgres | |
volumes: | |
- .:/usr/src/appp | |
ports: | |
- "8000:8000" | |
depends_on: | |
- db | |
db: | |
image: postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment