Files
notifications-admin/app/cloudfoundry_config.py
Ben Thorner be1fc9de79 Remove redundant CloudFoundry config code
These env vars can be set directly in the manifest, like we do for
Template Preview [^1].

[^1]: c08036189b/manifest.yml.j2 (L23-L26)
2022-04-13 14:45:29 +01:00

11 lines
254 B
Python

import json
import os
def extract_cloudfoundry_config():
vcap_services = json.loads(os.environ['VCAP_SERVICES'])
# Redis config
if 'redis' in vcap_services:
os.environ['REDIS_URL'] = vcap_services['redis'][0]['credentials']['uri']