-
Notifications
You must be signed in to change notification settings - Fork 0
/
wsgi_preprod.py
36 lines (24 loc) · 744 Bytes
/
wsgi_preprod.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- encoding: utf-8 -*-
"""
wsgi file to run app in production mode from gunicorn
"""
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
os.environ['FLASK_CONFIGURATION'] = "preprod"
from app import app, log_app
if __name__ == '__main__':
"""
runner for the CIS front Flask app
- warning : gets most of its variables at start from environment variables
in command line just type :
"python wsgi.py"
or
"gunicorn --bind 0.0.0.0:8200 --workers=1 wsgi_preprod:app" for instance
"""
# set environment variable to set config later in config_app.config_env.py
print "= "*25
print "= = = WSGI / RERUN FLASK APP = = ="
log_app.info
print "= "*25
# simple flask runner
app.run()