mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-04 18:32:33 -05:00
Setting ENV to live and read config on non-dev environments from a file.
This commit is contained in:
@@ -24,6 +24,8 @@ def create_app(config_name):
|
||||
|
||||
application.config['NOTIFY_API_ENVIRONMENT'] = config_name
|
||||
application.config.from_object(configs[config_name])
|
||||
if config_name is not 'development':
|
||||
application.config.from_envvar('FLASK_CONFIG')
|
||||
db.init_app(application)
|
||||
init_app(application)
|
||||
init_csrf(application)
|
||||
|
||||
@@ -9,6 +9,10 @@ hooks:
|
||||
timeout: 300
|
||||
runas: root
|
||||
ApplicationStart:
|
||||
- location: scripts/aws_run_app.sh
|
||||
- location: scripts/aws_start_app.sh
|
||||
timeout: 300
|
||||
runas: root
|
||||
runas: ubuntu
|
||||
ApplicationStop:
|
||||
- location: scripts/aws_stop_app.sh
|
||||
timeout: 300
|
||||
runas: ubuntu
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting application"
|
||||
python /home/ubuntu/notifications-admin/app.py runserver &
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting application"
|
||||
export NOTIFICATIONS_ADMIN_ENVIRONMENT='live'
|
||||
cd ~/notifications-admin/;
|
||||
sudo service notifications-admin start
|
||||
Reference in New Issue
Block a user