From 427aecca919d84fbacb6abcda9bcc443d84ae0d7 Mon Sep 17 00:00:00 2001 From: Melissa Autumn Date: Fri, 17 May 2024 08:18:08 -0700 Subject: [PATCH] Add env `REDIS_USE_SSL` to allow redis to connect over ssl --- backend/.env.example | 1 + backend/src/appointment/dependencies/database.py | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/.env.example b/backend/.env.example index da11119f5..541c15619 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -98,6 +98,7 @@ REDIS_PORT=6379 REDIS_DB=0 # No value = Python None REDIS_PASSWORD +REDIS_USE_SSL=False # In minutes, the time a cached remote event will expire at. REDIS_EVENT_EXPIRE_TIME=15 diff --git a/backend/src/appointment/dependencies/database.py b/backend/src/appointment/dependencies/database.py index 6fe4d3afa..6f6f435dc 100644 --- a/backend/src/appointment/dependencies/database.py +++ b/backend/src/appointment/dependencies/database.py @@ -40,5 +40,6 @@ def get_redis() -> Redis | None: port=os.getenv('REDIS_PORT'), db=os.getenv('REDIS_DB'), password=os.getenv('REDIS_PASSWORD'), + ssl=os.getenv('REDIS_USE_SSL'), decode_responses=True, )