Skip to content

Instantly share code, notes, and snippets.

@niomwungeri-fabrice
Created October 29, 2019 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niomwungeri-fabrice/0d0cc11fa0f934c68eb0e27dcd3ca97f to your computer and use it in GitHub Desktop.
Save niomwungeri-fabrice/0d0cc11fa0f934c68eb0e27dcd3ca97f to your computer and use it in GitHub Desktop.
Docker-compose config for Python 3 and Django
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