mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
These env vars can be set directly in the manifest, like we do for
Template Preview [^1].
[^1]: c08036189b/manifest.yml.j2 (L23-L26)
11 lines
254 B
Python
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']
|