mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
- initial versions kept it out of this class but updated as lots of duplication and errors as config set up in multiple places and not all picking up credstash.
18 lines
472 B
Python
18 lines
472 B
Python
from credstash import getAllSecrets
|
|
from flask.ext.script import Manager, Server
|
|
from flask_migrate import Migrate, MigrateCommand
|
|
from app import create_app, db
|
|
|
|
secrets = getAllSecrets(region="eu-west-1")
|
|
|
|
application = create_app('live')
|
|
|
|
for key in application.config.keys():
|
|
if key in secrets:
|
|
application.config[key] = secrets[key]
|
|
|
|
|
|
manager = Manager(application)
|
|
migrate = Migrate(application, db)
|
|
manager.add_command('db', MigrateCommand)
|