cookiecutter-django/{{cookiecutter.repo_name}}/docker-compose.yml

44 lines
733 B
YAML
Raw Normal View History

2015-07-16 18:43:02 +03:00
postgres:
2016-01-06 11:58:18 +03:00
image: postgres:9.5
2015-07-16 18:43:02 +03:00
volumes:
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
env_file: .env
2015-07-16 18:43:02 +03:00
django:
build: .
user: django
2015-07-16 18:43:02 +03:00
links:
- postgres
2015-07-21 11:22:02 +03:00
- redis
2015-07-16 18:43:02 +03:00
command: /gunicorn.sh
env_file: .env
2015-07-16 18:43:02 +03:00
nginx:
build: ./compose/nginx
links:
- django
ports:
- "0.0.0.0:80:80"
2015-07-21 11:22:02 +03:00
redis:
image: redis:3.0
{% if cookiecutter.use_celery == 'y' %}
2015-07-16 18:43:02 +03:00
celeryworker:
build: .
user: django
env_file: .env
2015-07-16 18:43:02 +03:00
links:
- postgres
2015-07-21 11:22:02 +03:00
- redis
command: celery -A {{cookiecutter.repo_name}}.taskapp worker -l INFO
2015-07-16 18:43:02 +03:00
celerybeat:
build: .
user: django
env_file: .env
2015-07-16 18:43:02 +03:00
links:
- postgres
2015-07-21 11:22:02 +03:00
- redis
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
2016-01-06 11:58:18 +03:00
{% endif %}