Update Redis configuration in settings.py to use environment variable for host
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 2m6s

This commit is contained in:
2025-06-26 20:16:55 +05:00
parent 39da124214
commit 28315c59cf

View File

@ -31,7 +31,7 @@ SECRET_KEY = env("SECRET_KEY", default=get_random_secret_key())
DEBUG = env.bool("DJANGO_DEBUG", default=True) # type: ignore
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[]) # type: ignore
REDIS_HOST = env("REDIS_HOST", default="redis") # type: ignore
if DEBUG:
INTERNAL_IPS = [
@ -367,7 +367,7 @@ PASSWORDLESS_AUTH = {
# CELERY CONFIGURATION
CELERY_BROKER_URL = "redis://localhost:6379/0" # or your Redis URL
CELERY_BROKER_URL = f"redis://{REDIS_HOST}:6379/0"
CELERY_ACCEPT_CONTENT = ["json"]
CELERY_TASK_SERIALIZER = "json"
CELERY_RESULT_BACKEND = "redis://localhost:6379/0"
CELERY_RESULT_BACKEND = f"redis://{REDIS_HOST}:6379/0"