2016-03-03 07:16:25 +03:00
|
|
|
version: '2'
|
2016-04-08 09:31:02 +03:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgres_data_dev: {}
|
|
|
|
postgres_backup_dev: {}
|
|
|
|
|
2016-03-03 07:16:25 +03:00
|
|
|
services:
|
2017-08-11 10:13:30 +03:00
|
|
|
django: &django
|
2016-03-03 07:16:25 +03:00
|
|
|
build:
|
|
|
|
context: .
|
2016-03-23 22:45:09 +03:00
|
|
|
dockerfile: ./compose/django/Dockerfile-dev
|
2016-03-03 07:16:25 +03:00
|
|
|
depends_on:
|
2017-03-24 20:45:31 +03:00
|
|
|
- postgres{% if cookiecutter.use_mailhog == 'y' %}
|
|
|
|
- mailhog{% endif %}
|
2017-08-11 10:13:30 +03:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
2016-03-16 19:06:48 +03:00
|
|
|
environment:
|
2016-04-20 20:00:35 +03:00
|
|
|
- POSTGRES_USER={{cookiecutter.project_slug}}
|
2016-06-18 05:09:08 +03:00
|
|
|
- USE_DOCKER=yes
|
2016-03-03 07:16:25 +03:00
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
2017-08-11 10:13:30 +03:00
|
|
|
command: /start-dev.sh
|
2016-04-11 01:33:14 +03:00
|
|
|
|
2017-08-11 10:13:30 +03:00
|
|
|
postgres:
|
|
|
|
build: ./compose/postgres
|
|
|
|
volumes:
|
|
|
|
- postgres_data_dev:/var/lib/postgresql/data
|
|
|
|
- postgres_backup_dev:/backups
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER={{cookiecutter.project_slug}}
|
2016-03-27 21:47:43 +03:00
|
|
|
{% if cookiecutter.use_pycharm == 'y' %}
|
|
|
|
pycharm:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./compose/django/Dockerfile-dev
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
environment:
|
2016-04-20 20:00:35 +03:00
|
|
|
- POSTGRES_USER={{cookiecutter.project_slug}}
|
2016-03-27 21:47:43 +03:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
{% endif %}
|
2016-04-11 00:18:38 +03:00
|
|
|
{% if cookiecutter.use_mailhog == 'y' %}
|
|
|
|
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"
|
|
|
|
{% endif %}
|
2017-08-11 10:13:30 +03:00
|
|
|
{% if cookiecutter.use_celery == 'y' %}
|
|
|
|
redis:
|
|
|
|
image: redis:3.0
|
|
|
|
|
|
|
|
celeryworker:
|
|
|
|
# https://github.com/docker/compose/issues/3220
|
|
|
|
<<: *django
|
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
- postgres{% if cookiecutter.use_mailhog == 'y' %}
|
|
|
|
- mailhog{% endif %}
|
|
|
|
ports: []
|
|
|
|
command: /start-celeryworker-dev.sh
|
|
|
|
|
|
|
|
celerybeat:
|
|
|
|
# https://github.com/docker/compose/issues/3220
|
|
|
|
<<: *django
|
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
- postgres{% if cookiecutter.use_mailhog == 'y' %}
|
|
|
|
- mailhog{% endif %}
|
|
|
|
ports: []
|
|
|
|
command: /start-celerybeat-dev.sh
|
|
|
|
{% endif %}
|