Run API on Paas

This commit is contained in:
bandesz
2016-12-08 12:12:45 +00:00
parent d759842adc
commit fd66fbd719
29 changed files with 703 additions and 44 deletions

View File

@@ -11,10 +11,11 @@ if os.path.isfile(default_env_file):
with open(default_env_file, 'r') as environment_file:
environment = environment_file.readline().strip()
# on aws get secrets and export to env
os.environ.update(getAllSecrets(region="eu-west-1"))
# On AWS get secrets and export to env, skip this on Cloud Foundry
if os.getenv('VCAP_SERVICES') is None:
os.environ.update(getAllSecrets(region="eu-west-1"))
from config import configs
from app.config import configs
os.environ['NOTIFY_API_ENVIRONMENT'] = configs[environment]