mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-27 12:04:03 +03:00
188ff966f8
* Re-organize compose/ into environment-specific file groups Closes #1316. * Commit missing files That was weird: git failed to commit one specific folder previously
58 lines
1.1 KiB
YAML
58 lines
1.1 KiB
YAML
version: '2'
|
|
|
|
volumes:
|
|
postgres_data: {}
|
|
postgres_backup: {}
|
|
caddy: {}
|
|
|
|
services:
|
|
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
|
build:
|
|
context: .
|
|
dockerfile: ./compose/production/django/Dockerfile
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
env_file: .env
|
|
command: /gunicorn.sh
|
|
|
|
postgres:
|
|
build:
|
|
context: .
|
|
dockerfile: ./compose/production/postgres/Dockerfile
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- postgres_backup:/backups
|
|
env_file: .env
|
|
|
|
caddy:
|
|
build:
|
|
context: .
|
|
dockerfile: ./compose/production/caddy/Dockerfile
|
|
depends_on:
|
|
- django
|
|
volumes:
|
|
- caddy:/root/.caddy
|
|
env_file: .env
|
|
ports:
|
|
- "0.0.0.0:80:80"
|
|
- "0.0.0.0:443:443"
|
|
|
|
redis:
|
|
image: redis:3.0
|
|
{% if cookiecutter.use_celery == 'y' %}
|
|
celeryworker:
|
|
<<: *django
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: /start-celeryworker.sh
|
|
|
|
celerybeat:
|
|
<<: *django
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: /start-celerybeat.sh
|
|
{% endif %}
|