2016-03-03 04:16:25 +00:00
|
|
|
version: '2'
|
2016-04-08 06:31:02 +00:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres_data: {}
|
|
|
|
|
postgres_backup: {}
|
2017-08-11 09:16:15 +00:00
|
|
|
caddy: {}
|
2016-04-08 06:31:02 +00:00
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
services:
|
2017-09-05 11:39:20 +00:00
|
|
|
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
2016-03-03 04:16:25 +00:00
|
|
|
build:
|
|
|
|
|
context: .
|
2017-09-05 11:39:20 +00:00
|
|
|
dockerfile: ./compose/production/django/Dockerfile
|
2018-04-04 10:38:57 +00:00
|
|
|
image: {{ cookiecutter.project_slug }}_production_django
|
2016-03-08 09:12:55 +00:00
|
|
|
depends_on:
|
2016-03-03 04:16:25 +00:00
|
|
|
- postgres
|
|
|
|
|
- redis
|
2018-03-08 12:56:15 +00:00
|
|
|
env_file:
|
|
|
|
|
- ./.envs/.production/.django
|
|
|
|
|
- ./.envs/.production/.postgres
|
2018-05-21 19:28:18 +00:00
|
|
|
command: /start
|
2015-07-16 15:43:02 +00:00
|
|
|
|
2017-08-11 07:13:30 +00:00
|
|
|
postgres:
|
2017-09-05 11:39:20 +00:00
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: ./compose/production/postgres/Dockerfile
|
2018-04-04 10:38:57 +00:00
|
|
|
image: {{ cookiecutter.project_slug }}_production_postgres
|
2017-08-11 07:13:30 +00:00
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
- postgres_backup:/backups
|
2018-03-08 12:56:15 +00:00
|
|
|
env_file:
|
|
|
|
|
- ./.envs/.production/.postgres
|
2017-08-11 07:13:30 +00:00
|
|
|
|
2017-08-11 09:16:15 +00:00
|
|
|
caddy:
|
2017-09-05 11:39:20 +00:00
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: ./compose/production/caddy/Dockerfile
|
2018-04-04 10:38:57 +00:00
|
|
|
image: {{ cookiecutter.project_slug }}_production_caddy
|
2016-03-08 09:12:55 +00:00
|
|
|
depends_on:
|
2016-03-03 04:16:25 +00:00
|
|
|
- django
|
2016-06-03 15:07:39 +00:00
|
|
|
volumes:
|
2017-08-11 09:16:15 +00:00
|
|
|
- caddy:/root/.caddy
|
2018-03-08 12:56:15 +00:00
|
|
|
env_file:
|
|
|
|
|
- ./.envs/.production/.caddy
|
2017-09-05 11:39:20 +00:00
|
|
|
ports:
|
|
|
|
|
- "0.0.0.0:80:80"
|
|
|
|
|
- "0.0.0.0:443:443"
|
2015-07-16 15:43:02 +00:00
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
redis:
|
2018-05-04 22:30:57 +00:00
|
|
|
image: redis:3.2
|
2018-03-08 15:10:38 +00:00
|
|
|
{%- if cookiecutter.use_celery == 'y' %}
|
|
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
celeryworker:
|
2017-09-05 11:39:20 +00:00
|
|
|
<<: *django
|
2018-04-04 10:38:57 +00:00
|
|
|
image: {{ cookiecutter.project_slug }}_production_celeryworker
|
2016-03-08 09:12:55 +00:00
|
|
|
depends_on:
|
2016-03-03 04:16:25 +00:00
|
|
|
- postgres
|
|
|
|
|
- redis
|
2018-03-08 12:56:15 +00:00
|
|
|
env_file:
|
2018-04-04 07:52:16 +00:00
|
|
|
- ./.envs/.production/.django
|
2018-03-28 15:17:23 +00:00
|
|
|
- ./.envs/.production/.postgres
|
2018-05-14 07:28:50 +00:00
|
|
|
command: /start-celeryworker
|
2015-07-16 15:43:02 +00:00
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
celerybeat:
|
2017-09-05 11:39:20 +00:00
|
|
|
<<: *django
|
2018-04-04 10:38:57 +00:00
|
|
|
image: {{ cookiecutter.project_slug }}_production_celerybeat
|
2016-03-08 09:12:55 +00:00
|
|
|
depends_on:
|
2016-03-03 04:16:25 +00:00
|
|
|
- postgres
|
|
|
|
|
- redis
|
2018-03-08 12:56:15 +00:00
|
|
|
env_file:
|
2018-04-04 07:52:16 +00:00
|
|
|
- ./.envs/.production/.django
|
2018-03-28 15:17:23 +00:00
|
|
|
- ./.envs/.production/.postgres
|
2018-05-14 07:28:50 +00:00
|
|
|
command: /start-celerybeat
|
2018-03-08 15:10:38 +00:00
|
|
|
|
|
|
|
|
{%- endif %}
|