mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
Incorporate credstash in production wsgi scripts.
This commit is contained in:
@@ -8,6 +8,7 @@ SQLAlchemy-Utils==0.30.5
|
||||
Flask-WTF==0.11
|
||||
Flask-Login==0.2.11
|
||||
Flask-Bcrypt==0.6.2
|
||||
credstash==1.8.0
|
||||
|
||||
git+https://github.com/alphagov/notify-api-client.git@0.1.4#egg=notify-api-client==0.1.4
|
||||
|
||||
|
||||
9
wsgi.py
9
wsgi.py
@@ -1,7 +1,14 @@
|
||||
from app import create_app
|
||||
import os
|
||||
from credstash import getAllSecrets
|
||||
|
||||
application = create_app(os.getenv('NOTIFICATIONS_ADMIN_ENVIRONMENT') or 'development')
|
||||
secrets = getAllSecrets(region="eu-west-1")
|
||||
|
||||
application = create_app(os.getenv('NOTIFICATIONS_ADMIN_ENVIRONMENT') or 'live')
|
||||
|
||||
for key in application.config.keys():
|
||||
if key in secrets:
|
||||
application.config[key] = secrets[key]
|
||||
|
||||
if __name__ == "__main__":
|
||||
application.run()
|
||||
|
||||
Reference in New Issue
Block a user