Update build.

This commit is contained in:
Nicholas Staples
2016-01-27 16:32:40 +00:00
parent 2d35f5f36a
commit fbe49d0c95
3 changed files with 2 additions and 20 deletions

View File

@@ -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
View File

@@ -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
View File

@@ -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()