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

@@ -3,8 +3,9 @@ from app import notify_celery, create_app
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("delivery")
application.app_context().push()