Revert "Revert "remove credstash""

This reverts commit de41fde0d3.
This commit is contained in:
Leo Hemsted
2017-07-31 11:11:00 +01:00
parent cce8ef1c50
commit 9c212e78af
5 changed files with 3 additions and 26 deletions

View File

@@ -1,11 +1,5 @@
#!/usr/bin/env python
from app import notify_celery, create_app
from credstash import getAllSecrets
import os
# 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 app import create_app
application = create_app("delivery")
application.app_context().push()

8
db.py
View File

@@ -1,12 +1,8 @@
from flask.ext.script import Manager, Server
from flask_migrate import Migrate, MigrateCommand
from app import create_app, db
from credstash import getAllSecrets
import os
# 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 app import create_app, db
application = create_app()

View File

@@ -11,7 +11,6 @@ marshmallow==2.4.2
marshmallow-sqlalchemy==0.8.0
flask-marshmallow==0.6.2
Flask-Bcrypt==0.6.2
credstash==1.8.0
boto3==1.4.4
celery==3.1.25 # pyup: <4
monotonic==1.2

View File

@@ -1,7 +1,6 @@
from flask.ext.script import Manager, Server
from flask_migrate import Migrate, MigrateCommand
from app import (create_app, db, commands)
from credstash import getAllSecrets
import os
default_env_file = '/home/ubuntu/environment'
@@ -11,10 +10,6 @@ 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, skip this on Cloud Foundry
if os.getenv('VCAP_SERVICES') is None:
os.environ.update(getAllSecrets(region="eu-west-1"))
from app.config import configs
os.environ['NOTIFY_API_ENVIRONMENT'] = configs[environment]

View File

@@ -1,13 +1,6 @@
import os
from app import create_app
from credstash import getAllSecrets
# 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()
if __name__ == "__main__":