2015-12-15 16:37:54 +00:00
|
|
|
from app import create_app
|
2016-01-19 14:50:42 +00:00
|
|
|
from credstash import getAllSecrets
|
2016-02-09 13:41:20 +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-15 16:37:54 +00:00
|
|
|
|
2016-01-19 14:50:42 +00:00
|
|
|
secrets = getAllSecrets(region="eu-west-1")
|
|
|
|
|
|
2016-02-09 13:41:20 +00:00
|
|
|
application = create_app(config, secrets)
|
2015-12-15 16:37:54 +00:00
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
application.run()
|