mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-09 16:10:49 +03:00
48 lines
882 B
YAML
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 %} |