cookiecutter-django/{{cookiecutter.repo_name}}/docker-compose.yml
2015-07-21 10:22:02 +02:00

48 lines
882 B
YAML

postgres:
image: postgres:9.4
volumes:
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
env_file: env.production
django:
build: .
links:
- postgres
- redis
{% if cookiecutter.use_celery %}
- rabbitmq
{% endif %}
command: /gunicorn.sh
env_file: env.production
nginx:
build: ./compose/nginx
links:
- django
ports:
- "0.0.0.0:80:80"
redis:
image: redis:3.0
{% if cookiecutter.use_celery %}
rabbitmq:
image: rabbitmq
celeryworker:
build: .
env_file: env.production
links:
- rabbitmq
- postgres
- redis
command: su -m django -c "celery -A {{cookiecutter.repo_name}}.taskman worker -l INFO"
celerybeat:
build: .
env_file: env.production
links:
- rabbitmq
- postgres
- redis
command: su -m django -c "celery -A {{cookiecutter.repo_name}}.taskman beat -l INFO"
{% endif %}