2018-06-27 19:45:36 +03:00
|
|
|
version: '3'
|
2016-04-08 09:31:02 +03:00
|
|
|
|
|
|
|
volumes:
|
2022-01-17 11:53:56 +03:00
|
|
|
{{ cookiecutter.project_slug }}_local_postgres_data: {}
|
|
|
|
{{ cookiecutter.project_slug }}_local_postgres_data_backups: {}
|
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
|
2018-04-04 13:38:57 +03:00
|
|
|
image: {{ cookiecutter.project_slug }}_local_django
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_django
|
2022-02-07 21:23:55 +03:00
|
|
|
platform: linux/x86_64
|
2016-03-03 07:16:25 +03:00
|
|
|
depends_on:
|
2018-03-08 15:56:15 +03:00
|
|
|
- postgres
|
2021-11-25 18:55:03 +03:00
|
|
|
{%- if cookiecutter.use_celery == 'y' %}
|
|
|
|
- redis
|
|
|
|
{%- endif %}
|
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:
|
2020-09-07 15:51:52 +03:00
|
|
|
- .:/app:z
|
2018-03-08 15:56:15 +03:00
|
|
|
env_file:
|
|
|
|
- ./.envs/.local/.django
|
|
|
|
- ./.envs/.local/.postgres
|
2016-03-03 07:16:25 +03:00
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
2018-05-14 10:28:50 +03:00
|
|
|
command: /start
|
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
|
2018-04-04 13:38:57 +03:00
|
|
|
image: {{ cookiecutter.project_slug }}_production_postgres
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_postgres
|
2017-08-11 10:13:30 +03:00
|
|
|
volumes:
|
2022-01-17 11:53:56 +03:00
|
|
|
- {{ cookiecutter.project_slug }}_local_postgres_data:/var/lib/postgresql/data:Z
|
|
|
|
- {{ cookiecutter.project_slug }}_local_postgres_data_backups:/backups:z
|
2018-03-08 15:56:15 +03:00
|
|
|
env_file:
|
|
|
|
- ./.envs/.local/.postgres
|
2020-04-24 17:23:41 +03:00
|
|
|
|
|
|
|
docs:
|
|
|
|
image: {{ cookiecutter.project_slug }}_local_docs
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_docs
|
2022-02-07 21:23:55 +03:00
|
|
|
platform: linux/x86_64
|
2020-04-24 17:23:41 +03:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./compose/local/docs/Dockerfile
|
|
|
|
env_file:
|
|
|
|
- ./.envs/.local/.django
|
|
|
|
volumes:
|
2020-09-07 15:51:52 +03:00
|
|
|
- ./docs:/docs:z
|
|
|
|
- ./config:/app/config:z
|
|
|
|
- ./{{ cookiecutter.project_slug }}:/app/{{ cookiecutter.project_slug }}:z
|
2020-04-24 17:23:41 +03:00
|
|
|
ports:
|
2022-02-13 15:49:05 +03:00
|
|
|
- "9000:9000"
|
2020-11-04 20:17:02 +03:00
|
|
|
command: /start-docs
|
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
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_mailhog
|
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:
|
2021-08-13 10:52:25 +03:00
|
|
|
image: redis:6
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_redis
|
2017-08-11 10:13:30 +03:00
|
|
|
|
|
|
|
celeryworker:
|
|
|
|
<<: *django
|
2018-04-04 13:38:57 +03:00
|
|
|
image: {{ cookiecutter.project_slug }}_local_celeryworker
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_celeryworker
|
2017-08-11 10:13:30 +03:00
|
|
|
depends_on:
|
|
|
|
- redis
|
2018-03-08 15:56:15 +03:00
|
|
|
- postgres
|
2021-03-03 01:50:28 +03:00
|
|
|
{%- if cookiecutter.use_mailhog == 'y' %}
|
2018-03-08 15:56:15 +03:00
|
|
|
- mailhog
|
|
|
|
{%- endif %}
|
2021-06-28 15:02:16 +03:00
|
|
|
ports: []
|
2018-05-14 10:28:50 +03:00
|
|
|
command: /start-celeryworker
|
2017-08-11 10:13:30 +03:00
|
|
|
|
|
|
|
celerybeat:
|
|
|
|
<<: *django
|
2018-04-04 13:38:57 +03:00
|
|
|
image: {{ cookiecutter.project_slug }}_local_celerybeat
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_celerybeat
|
2017-08-11 10:13:30 +03:00
|
|
|
depends_on:
|
|
|
|
- redis
|
2018-03-08 15:56:15 +03:00
|
|
|
- postgres
|
2021-03-03 01:50:28 +03:00
|
|
|
{%- if cookiecutter.use_mailhog == 'y' %}
|
2018-03-08 15:56:15 +03:00
|
|
|
- mailhog
|
|
|
|
{%- endif %}
|
2021-06-28 15:02:16 +03:00
|
|
|
ports: []
|
2018-05-14 10:28:50 +03:00
|
|
|
command: /start-celerybeat
|
2018-03-08 18:10:38 +03:00
|
|
|
|
2018-06-27 19:33:21 +03:00
|
|
|
flower:
|
|
|
|
<<: *django
|
|
|
|
image: {{ cookiecutter.project_slug }}_local_flower
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_flower
|
2018-06-27 19:33:21 +03:00
|
|
|
ports:
|
|
|
|
- "5555:5555"
|
|
|
|
command: /start-flower
|
|
|
|
|
2018-03-08 18:10:38 +03:00
|
|
|
{%- endif %}
|
2019-03-25 15:10:55 +03:00
|
|
|
{%- if cookiecutter.js_task_runner == 'Gulp' %}
|
|
|
|
|
|
|
|
node:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./compose/local/node/Dockerfile
|
|
|
|
image: {{ cookiecutter.project_slug }}_local_node
|
2022-01-17 11:53:56 +03:00
|
|
|
container_name: {{ cookiecutter.project_slug }}_local_node
|
2019-03-25 15:10:55 +03:00
|
|
|
depends_on:
|
|
|
|
- django
|
|
|
|
volumes:
|
2020-09-07 15:51:52 +03:00
|
|
|
- .:/app:z
|
2019-03-25 15:10:55 +03:00
|
|
|
# http://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html
|
|
|
|
- /app/node_modules
|
|
|
|
command: npm run dev
|
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
# Expose browsersync UI: https://www.browsersync.io/docs/options/#option-ui
|
|
|
|
- "3001:3001"
|
|
|
|
|
|
|
|
{%- endif %}
|