mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 00:06:16 -04:00
Moved import until after env setup
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
from app import notify_celery, create_app
|
from app import notify_celery, create_app
|
||||||
from credstash import getAllSecrets
|
from credstash import getAllSecrets
|
||||||
import os
|
import os
|
||||||
from config import configs
|
|
||||||
|
|
||||||
default_env_file = '/home/ubuntu/environment'
|
default_env_file = '/home/ubuntu/environment'
|
||||||
environment = 'live'
|
environment = 'live'
|
||||||
@@ -14,6 +13,8 @@ if os.path.isfile(default_env_file):
|
|||||||
# on aws get secrets and export to env
|
# on aws get secrets and export to env
|
||||||
os.environ.update(getAllSecrets(region="eu-west-1"))
|
os.environ.update(getAllSecrets(region="eu-west-1"))
|
||||||
|
|
||||||
|
from config import configs
|
||||||
|
|
||||||
os.environ['NOTIFY_API_ENVIRONMENT'] = configs[environment]
|
os.environ['NOTIFY_API_ENVIRONMENT'] = configs[environment]
|
||||||
|
|
||||||
application = create_app()
|
application = create_app()
|
||||||
|
|||||||
4
wsgi.py
4
wsgi.py
@@ -2,7 +2,6 @@ import os
|
|||||||
|
|
||||||
from app import create_app
|
from app import create_app
|
||||||
from credstash import getAllSecrets
|
from credstash import getAllSecrets
|
||||||
from config import configs
|
|
||||||
|
|
||||||
|
|
||||||
default_env_file = '/home/ubuntu/environment'
|
default_env_file = '/home/ubuntu/environment'
|
||||||
@@ -14,6 +13,9 @@ if os.path.isfile(default_env_file):
|
|||||||
|
|
||||||
# on aws get secrets and export to env
|
# on aws get secrets and export to env
|
||||||
os.environ.update(getAllSecrets(region="eu-west-1"))
|
os.environ.update(getAllSecrets(region="eu-west-1"))
|
||||||
|
|
||||||
|
from config import configs
|
||||||
|
|
||||||
os.environ['NOTIFY_API_ENVIRONMENT'] = configs[environment]
|
os.environ['NOTIFY_API_ENVIRONMENT'] = configs[environment]
|
||||||
|
|
||||||
application = create_app()
|
application = create_app()
|
||||||
|
|||||||
Reference in New Issue
Block a user