mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-03-06 02:12:12 -05:00
Update build.
This commit is contained in:
@@ -12,8 +12,6 @@ install:
|
||||
- npm install
|
||||
- npm rebuild node-sass
|
||||
- pip install -r requirements_for_test.txt
|
||||
before_script:
|
||||
- psql -c 'create database test_notifications_admin;' -U postgres
|
||||
after_success:
|
||||
- ./scripts/trigger-dependent-build.sh
|
||||
script:
|
||||
|
||||
5
app.py
5
app.py
@@ -1,15 +1,14 @@
|
||||
import os
|
||||
from flask.ext.script import Manager, Server
|
||||
from flask_migrate import Migrate, MigrateCommand
|
||||
from app import create_app, db
|
||||
from app import create_app
|
||||
|
||||
|
||||
application = create_app(os.getenv('NOTIFICATIONS_ADMIN_ENVIRONMENT') or 'development')
|
||||
manager = Manager(application)
|
||||
port = int(os.environ.get('PORT', 6012))
|
||||
manager.add_command("runserver", Server(host='0.0.0.0', port=port))
|
||||
migrate = Migrate(application, db)
|
||||
manager.add_command('db', MigrateCommand)
|
||||
|
||||
|
||||
|
||||
@manager.command
|
||||
|
||||
15
db.py
15
db.py
@@ -1,15 +0,0 @@
|
||||
from flask.ext.script import Manager, Server
|
||||
from flask_migrate import Migrate, MigrateCommand
|
||||
from app import create_app, db
|
||||
from credstash import getAllSecrets
|
||||
|
||||
secrets = getAllSecrets(region="eu-west-1")
|
||||
|
||||
application = create_app('live', secrets)
|
||||
|
||||
manager = Manager(application)
|
||||
migrate = Migrate(application, db)
|
||||
manager.add_command('db', MigrateCommand)
|
||||
|
||||
if __name__ == '__main__':
|
||||
manager.run()
|
||||
Reference in New Issue
Block a user