mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 14:49:49 -04:00
Removed secrets setup from db script
This commit is contained in:
8
db.py
8
db.py
@@ -1,17 +1,9 @@
|
|||||||
from credstash import getAllSecrets
|
|
||||||
from flask.ext.script import Manager, Server
|
from flask.ext.script import Manager, Server
|
||||||
from flask_migrate import Migrate, MigrateCommand
|
from flask_migrate import Migrate, MigrateCommand
|
||||||
from app import create_app, db
|
from app import create_app, db
|
||||||
|
|
||||||
secrets = getAllSecrets(region="eu-west-1")
|
|
||||||
|
|
||||||
application = create_app('live')
|
application = create_app('live')
|
||||||
|
|
||||||
for key in application.config.keys():
|
|
||||||
if key in secrets:
|
|
||||||
application.config[key] = secrets[key]
|
|
||||||
|
|
||||||
|
|
||||||
manager = Manager(application)
|
manager = Manager(application)
|
||||||
migrate = Migrate(application, db)
|
migrate = Migrate(application, db)
|
||||||
manager.add_command('db', MigrateCommand)
|
manager.add_command('db', MigrateCommand)
|
||||||
|
|||||||
Reference in New Issue
Block a user