2015-07-16 18:43:02 +03:00
|
|
|
postgres:
|
|
|
|
image: postgres:9.4
|
|
|
|
volumes:
|
|
|
|
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
|
|
|
env_file: env.production
|
|
|
|
|
|
|
|
django:
|
|
|
|
build: .
|
|
|
|
links:
|
|
|
|
- postgres
|
2015-07-21 11:22:02 +03:00
|
|
|
- redis
|
2015-07-16 18:43:02 +03:00
|
|
|
{% 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"
|
|
|
|
|
2015-07-21 11:22:02 +03:00
|
|
|
redis:
|
|
|
|
image: redis:3.0
|
2015-07-16 18:43:02 +03:00
|
|
|
{% if cookiecutter.use_celery %}
|
|
|
|
rabbitmq:
|
|
|
|
image: rabbitmq
|
|
|
|
|
|
|
|
celeryworker:
|
|
|
|
build: .
|
|
|
|
env_file: env.production
|
|
|
|
links:
|
|
|
|
- rabbitmq
|
|
|
|
- postgres
|
2015-07-21 11:22:02 +03:00
|
|
|
- redis
|
2015-07-16 18:43:02 +03:00
|
|
|
command: su -m django -c "celery -A {{cookiecutter.repo_name}}.taskman worker -l INFO"
|
|
|
|
|
|
|
|
celerybeat:
|
|
|
|
build: .
|
|
|
|
env_file: env.production
|
|
|
|
links:
|
|
|
|
- rabbitmq
|
|
|
|
- postgres
|
2015-07-21 11:22:02 +03:00
|
|
|
- redis
|
2015-07-16 18:43:02 +03:00
|
|
|
command: su -m django -c "celery -A {{cookiecutter.repo_name}}.taskman beat -l INFO"
|
|
|
|
{% endif %}
|