mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Use VCAP_APPLICATION to detect CloudFoundry environment
VCAP_SERVICES is not set on PaaS if no services are bound to the application, so we need to check for VCAP_APPLICATION to parse the application name and environment.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import os
|
||||
|
||||
|
||||
if os.environ.get('VCAP_SERVICES'):
|
||||
# on cloudfoundry, config is a json blob in VCAP_SERVICES - unpack it, and populate
|
||||
if os.environ.get('VCAP_APPLICATION'):
|
||||
# on cloudfoundry, config is a json blob in VCAP_APPLICATION - unpack it, and populate
|
||||
# standard environment variables from it
|
||||
from app.cloudfoundry_config import extract_cloudfoundry_config
|
||||
extract_cloudfoundry_config()
|
||||
|
||||
Reference in New Issue
Block a user