mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-06-27 09:43:58 +00:00
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
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 2m6s
This commit is contained in:
@ -31,7 +31,7 @@ SECRET_KEY = env("SECRET_KEY", default=get_random_secret_key())
|
|||||||
DEBUG = env.bool("DJANGO_DEBUG", default=True) # type: ignore
|
DEBUG = env.bool("DJANGO_DEBUG", default=True) # type: ignore
|
||||||
|
|
||||||
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[]) # type: ignore
|
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[]) # type: ignore
|
||||||
|
REDIS_HOST = env("REDIS_HOST", default="redis") # type: ignore
|
||||||
|
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
INTERNAL_IPS = [
|
INTERNAL_IPS = [
|
||||||
@ -367,7 +367,7 @@ PASSWORDLESS_AUTH = {
|
|||||||
|
|
||||||
|
|
||||||
# CELERY CONFIGURATION
|
# 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_ACCEPT_CONTENT = ["json"]
|
||||||
CELERY_TASK_SERIALIZER = "json"
|
CELERY_TASK_SERIALIZER = "json"
|
||||||
CELERY_RESULT_BACKEND = "redis://localhost:6379/0"
|
CELERY_RESULT_BACKEND = f"redis://{REDIS_HOST}:6379/0"
|
||||||
|
Reference in New Issue
Block a user