cookiecutter-django/{{cookiecutter.repo_name}}/docker-compose.yml
2016-01-06 09:58:18 +01:00

44 lines
733 B
YAML

postgres:
image: postgres:9.5
volumes:
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
env_file: .env
django:
build: .
user: django
links:
- postgres
- redis
command: /gunicorn.sh
env_file: .env
nginx:
build: ./compose/nginx
links:
- django
ports:
- "0.0.0.0:80:80"
redis:
image: redis:3.0
{% if cookiecutter.use_celery == 'y' %}
celeryworker:
build: .
user: django
env_file: .env
links:
- postgres
- redis
command: celery -A {{cookiecutter.repo_name}}.taskapp worker -l INFO
celerybeat:
build: .
user: django
env_file: .env
links:
- postgres
- redis
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
{% endif %}