mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Incorporate credstash in production wsgi scripts.
This commit is contained in:
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