From daaaab025862905bdf935487a58ee6e39828bbc9 Mon Sep 17 00:00:00 2001 From: Paul Wheatcroft Date: Tue, 18 Jun 2024 10:45:08 +0100 Subject: [PATCH] Updated env removed redis name change CACHE_URL added REDIS_URL = env.str("REDIS_URL") Standardise REDIS_URL env key Testing database settings in paas.py Re-implemented is_copilot for databases and removed from paas.py Ranamed REDI_URL env key to CACHE_ENDPOINT --- .env.ci | 2 +- config/settings/base.py | 2 +- config/settings/paas.py | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.env.ci b/.env.ci index d51c5be9..35544d61 100644 --- a/.env.ci +++ b/.env.ci @@ -3,7 +3,7 @@ SECRET_KEY=used_for_testing ALLOWED_HOSTS="*" DEBUG=False DATABASE_URL=psql://postgres:postgres@db:5432/fido -REDIS_ENDPOINT=redis://redis:6379 +CACHE_ENDPOINT=redis://redis:6379 AUTHBROKER_CLIENT_ID= AUTHBROKER_CLIENT_SECRET= AUTHBROKER_URL= diff --git a/config/settings/base.py b/config/settings/base.py index d2909245..128b380b 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -238,7 +238,7 @@ def FILTERS_VERBOSE_LOOKUPS(): credentials["port"], ) else: - REDIS_URL = env.str("REDIS_ENDPOINT") + REDIS_URL = env("CACHE_ENDPOINT", default=None) # Celery CELERY_BROKER_URL = REDIS_URL diff --git a/config/settings/paas.py b/config/settings/paas.py index e2a4a3d6..d2783b53 100644 --- a/config/settings/paas.py +++ b/config/settings/paas.py @@ -12,10 +12,4 @@ if is_copilot(): ALLOWED_HOSTS = setup_allowed_hosts(ALLOWED_HOSTS) - DATABASES["default"] = dj_database_url.config( - default=database_url_from_env("DATABASE_CREDENTIALS") - ) - - REDIS_URL = env("REDIS_URL", default=None) + "?ssl_cert_reqs=required" - LOGGING["handlers"]["console"]["formatter"] = "asim"