finally fix redis

This commit is contained in:
jimmoffet
2022-09-07 21:32:33 -07:00
parent 16d88dd6d9
commit 1f7fa07a79
7 changed files with 60 additions and 16 deletions

View File

@@ -7,7 +7,7 @@ if os.environ.get('VCAP_APPLICATION'):
# from app.cloudfoundry_config import extract_cloudfoundry_config
# extract_cloudfoundry_config()
vcap_services = json.loads(os.environ['VCAP_SERVICES'])
os.environ['REDIS_URL'] = vcap_services['aws-elasticache-redis'][0]['credentials']['uri']
os.environ['REDIS_URL'] = vcap_services['aws-elasticache-redis'][0]['credentials']['uri'].replace("redis", "rediss")
class Config(object):
@@ -128,9 +128,6 @@ class Development(Config):
ASSET_PATH = '/static/'
LOGO_CDN_DOMAIN = 'static-logos.notify.tools' # replace with our own CDN
REDIS_URL = os.environ.get('DEV_REDIS_URL', 'http://redis:6379')
REDIS_ENABLED = True
class Test(Development):
NOTIFY_ADMIN_API_CACHE_ENABLED = True
@@ -221,9 +218,6 @@ class Live(Config):
ASSET_PATH = '/static/' # TODO use a CDN
LOGO_CDN_DOMAIN = 'static-logos.notifications.service.gov.uk' # TODO use our own CDN
REDIS_URL = os.environ.get('REDIS_URL')
REDIS_ENABLED = True
ADMIN_CLIENT_SECRET = os.environ.get('ADMIN_CLIENT_SECRET')
ADMIN_CLIENT_USER_NAME = os.environ.get('ADMIN_CLIENT_USERNAME')
API_HOST_NAME = os.environ.get('API_HOST_NAME')