Skip to content

Instantly share code, notes, and snippets.

@f213
Created April 27, 2020 08:22
Show Gist options
  • Save f213/be15dc3d3607b55f56147cd154ed27c1 to your computer and use it in GitHub Desktop.
Save f213/be15dc3d3607b55f56147cd154ed27c1 to your computer and use it in GitHub Desktop.
# This is a docker-compose stub for django template at https://github.com/f213/django
version: '2'
services:
postgres:
image: postgres:12-alpine
ports:
- 5432:5432
redis:
image: redis:5-alpine
ports:
- 6379:6379
django:
image: your/image
volumes: &volumes
- ./src:/srv
command: ["dockerize", "-wait", "tcp://postgres:5432", "-timeout", "300s", "./manage.py", "runserver", "0.0.0.0:8000"]
ports:
- 8000:8000
environment: &environment
- DATABASE_URL=postgresql://postgres@postgres/postgres
- REDIS=redis://redis:6379/7
links:
- postgres
- redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment