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

5
db.py
View File

@@ -4,8 +4,9 @@ from app import create_app, db
from credstash import getAllSecrets
import os
# 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"))
application = create_app()