mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-29 04:54:02 +03:00
Add Redis persistent storage when using celery
This commit is contained in:
parent
f58530288c
commit
2c55a3d443
|
@ -3,6 +3,7 @@ version: '3'
|
||||||
volumes:
|
volumes:
|
||||||
{{ cookiecutter.project_slug }}_local_postgres_data: {}
|
{{ cookiecutter.project_slug }}_local_postgres_data: {}
|
||||||
{{ cookiecutter.project_slug }}_local_postgres_data_backups: {}
|
{{ cookiecutter.project_slug }}_local_postgres_data_backups: {}
|
||||||
|
{% if cookiecutter.use_celery == 'y' %}{{ cookiecutter.project_slug }}_local_redis_data: {}{% endif %}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
||||||
|
@ -54,6 +55,10 @@ services:
|
||||||
redis:
|
redis:
|
||||||
image: docker.io/redis:6
|
image: docker.io/redis:6
|
||||||
container_name: {{ cookiecutter.project_slug }}_local_redis
|
container_name: {{ cookiecutter.project_slug }}_local_redis
|
||||||
|
{% if cookiecutter.use_celery == 'y' %}
|
||||||
|
volumes:
|
||||||
|
- {{ cookiecutter.project_slug }}_local_redis_data:/data
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
celeryworker:
|
celeryworker:
|
||||||
<<: *django
|
<<: *django
|
||||||
|
|
|
@ -7,6 +7,10 @@ volumes:
|
||||||
{%- if cookiecutter.cloud_provider == 'None' %}
|
{%- if cookiecutter.cloud_provider == 'None' %}
|
||||||
production_django_media: {}
|
production_django_media: {}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{% if cookiecutter.use_celery == 'y' %}
|
||||||
|
production_redis_data: {}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %}
|
||||||
|
@ -68,6 +72,12 @@ services:
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: docker.io/redis:6
|
image: docker.io/redis:6
|
||||||
|
{% if cookiecutter.use_celery == 'y' %}
|
||||||
|
volumes:
|
||||||
|
- production_redis_data:/data
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{%- if cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
|
|
||||||
celeryworker:
|
celeryworker:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user