2016-03-03 07:16:25 +03:00
|
|
|
version: '2'
|
2016-04-08 09:31:02 +03:00
|
|
|
|
|
|
|
volumes:
|
2017-09-05 14:39:20 +03:00
|
|
|
postgres_data_local: {}
|
|
|
|
postgres_backup_local: {}
|
2016-04-08 09:31:02 +03:00
|
|
|
|
2016-03-03 07:16:25 +03:00
|
|
|
services:
|
2017-09-05 14:39:20 +03:00
|
|
|
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
2016-03-03 07:16:25 +03:00
|
|
|
build:
|
|
|
|
context: .
|
2017-09-05 14:39:20 +03:00
|
|
|
dockerfile: ./compose/local/django/Dockerfile
|
2016-03-03 07:16:25 +03:00
|
|
|
depends_on:
|
2018-03-08 15:56:15 +03:00
|
|
|
- postgres
|
2018-03-08 18:10:38 +03:00
|
|
|
{%- if cookiecutter.use_mailhog == 'y' %}
|
2018-03-08 15:56:15 +03:00
|
|
|
- mailhog
|
|
|
|
{%- endif %}
|
2017-08-11 10:13:30 +03:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
2018-03-08 15:56:15 +03:00
|
|
|
env_file:
|
|
|
|
- ./.envs/.local/.django
|
|
|
|
- ./.envs/.local/.postgres
|
2018-03-08 18:10:38 +03:00
|
|
|
{%- if cookiecutter.use_celery == 'y' %}
|
|
|
|
- ./.envs/.local/.celery
|
|
|
|
{%- endif %}
|
2016-03-03 07:16:25 +03:00
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
2017-09-05 14:39:20 +03:00
|
|
|
command: /start.sh
|
2016-04-11 01:33:14 +03:00
|
|
|
|
2017-08-11 10:13:30 +03:00
|
|
|
postgres:
|
2017-09-05 14:39:20 +03:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./compose/production/postgres/Dockerfile
|
2017-08-11 10:13:30 +03:00
|
|
|
volumes:
|
2017-09-05 14:39:20 +03:00
|
|
|
- postgres_data_local:/var/lib/postgresql/data
|
|
|
|
- postgres_backup_local:/backups
|
2018-03-08 15:56:15 +03:00
|
|
|
env_file:
|
|
|
|
- ./.envs/.local/.postgres
|
2018-03-08 18:10:38 +03:00
|
|
|
{%- if cookiecutter.use_mailhog == 'y' %}
|
|
|
|
|
2016-04-11 00:18:38 +03:00
|
|
|
mailhog:
|
2017-06-20 23:27:41 +03:00
|
|
|
image: mailhog/mailhog:v1.0.0
|
2016-04-11 00:18:38 +03:00
|
|
|
ports:
|
|
|
|
- "8025:8025"
|
2018-03-08 18:10:38 +03:00
|
|
|
|
|
|
|
{%- endif %}
|
|
|
|
{%- if cookiecutter.use_celery == 'y' %}
|
|
|
|
|
2017-08-11 10:13:30 +03:00
|
|
|
redis:
|
|
|
|
image: redis:3.0
|
|
|
|
|
|
|
|
celeryworker:
|
|
|
|
<<: *django
|
|
|
|
depends_on:
|
|
|
|
- redis
|
2018-03-08 15:56:15 +03:00
|
|
|
- postgres
|
|
|
|
{% if cookiecutter.use_mailhog == 'y' -%}
|
|
|
|
- mailhog
|
|
|
|
{%- endif %}
|
2018-03-08 18:10:38 +03:00
|
|
|
env_file:
|
|
|
|
- ./.envs/.local/.celery
|
2017-08-11 10:13:30 +03:00
|
|
|
ports: []
|
2017-09-05 14:39:20 +03:00
|
|
|
command: /start-celeryworker.sh
|
2017-08-11 10:13:30 +03:00
|
|
|
|
|
|
|
celerybeat:
|
|
|
|
<<: *django
|
|
|
|
depends_on:
|
|
|
|
- redis
|
2018-03-08 15:56:15 +03:00
|
|
|
- postgres
|
|
|
|
{% if cookiecutter.use_mailhog == 'y' -%}
|
|
|
|
- mailhog
|
|
|
|
{%- endif %}
|
2018-03-08 18:10:38 +03:00
|
|
|
env_file:
|
|
|
|
- ./.envs/.local/.celery
|
2017-08-11 10:13:30 +03:00
|
|
|
ports: []
|
2017-09-05 14:39:20 +03:00
|
|
|
command: /start-celerybeat.sh
|
2018-03-08 18:10:38 +03:00
|
|
|
|
|
|
|
{%- endif %}
|