2015-12-03 09:38:02 +00:00
|
|
|
from app import create_app
|
2016-01-11 09:59:31 +00:00
|
|
|
from credstash import getAllSecrets
|
2016-02-09 13:53:04 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
config = 'live'
|
|
|
|
|
default_env_file = '/home/ubuntu/environment'
|
|
|
|
|
|
|
|
|
|
if os.path.isfile(default_env_file):
|
|
|
|
|
environment = open(default_env_file, 'r')
|
|
|
|
|
config = environment.readline().strip()
|
2015-12-03 09:38:02 +00:00
|
|
|
|
2016-01-11 09:59:31 +00:00
|
|
|
secrets = getAllSecrets(region="eu-west-1")
|
|
|
|
|
|
2016-02-09 13:53:04 +00:00
|
|
|
application = create_app(config, secrets)
|
2016-01-10 21:53:41 +00:00
|
|
|
|
2015-12-03 09:38:02 +00:00
|
|
|
if __name__ == "__main__":
|
2015-12-03 09:40:28 +00:00
|
|
|
application.run()
|