Redis and tasks¶
Redis sidecar¶
add_django_website(..., redis_sidecar=True) (default) attaches a Redis container (mcr.microsoft.com/mirror/docker/library/redis:7.2) to the Web App and sets REDIS_SIDECAR=true.
Django settings then configure django_redis against redis://localhost:6379/0, with exceptions ignored so the site can start if Redis is briefly unavailable.
Django tasks¶
django_tasks=True (default) requires redis_sidecar=True and sets DJANGO_TASKS=true. Settings wire:
RQ_QUEUESusing the Redis cacheTASKSbackenddjango_tasks_rq.RQBackend
patch_django_settings_for_azure adds django_rq and django_tasks_rq to INSTALLED_APPS.
At startup, supervisord runs:
(with a long timeout so Entra credentials can refresh).
Disabling¶
Setting django_tasks=True with redis_sidecar=False raises ValueError.