cookiecutter-django/{{cookiecutter.project_slug}}/production.yml

60 lines
1.1 KiB
YAML
Raw Normal View History

version: '2'
2016-04-08 09:31:02 +03:00
volumes:
postgres_data: {}
postgres_backup: {}
2017-08-11 12:16:15 +03:00
caddy: {}
2016-04-08 09:31:02 +03:00
services:
django:
build:
context: .
dockerfile: ./compose/django/Dockerfile
2016-03-08 12:12:55 +03:00
depends_on:
- postgres
- redis
command: /gunicorn.sh
env_file: .env
2015-07-16 18:43:02 +03:00
postgres:
build: ./compose/postgres
volumes:
- postgres_data:/var/lib/postgresql/data
- postgres_backup:/backups
env_file: .env
2017-08-11 12:16:15 +03:00
caddy:
build: ./compose/caddy
2016-03-08 12:12:55 +03:00
depends_on:
- django
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
volumes:
2017-08-11 12:16:15 +03:00
- caddy:/root/.caddy
env_file: .env
2015-07-16 18:43:02 +03:00
redis:
image: redis:3.0
{% if cookiecutter.use_celery == 'y' %}
celeryworker:
build:
context: .
dockerfile: ./compose/django/Dockerfile
env_file: .env
2016-03-08 12:12:55 +03:00
depends_on:
- postgres
- redis
command: celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO
2015-07-16 18:43:02 +03:00
celerybeat:
build:
context: .
dockerfile: ./compose/django/Dockerfile
env_file: .env
2016-03-08 12:12:55 +03:00
depends_on:
- postgres
- redis
command: celery -A {{cookiecutter.project_slug}}.taskapp beat -l INFO
{% endif %}