Blame view

pdc_web.wsgi 939 Bytes
65f2cab9   hitier   Auto-Deploy files
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
37
38
39
40
41
42
43
#
# Simple wsgi wrapper to run flask app through apache.
#
# Relies on an apache2 virtualhost configuration.
# See ./resources/apache2-virtual-host.conf
#
# It merely calls the app factory and exports it as
# the application variable.

# The apache WSGIDaemonProcess allows us to set 
#  a virtualenv
#  a pythonpath

# Instead we could:
#
##  1- activate venv
# python_home = '/var/www/html/app-web/'
# activate_this = python_home + 'venv/bin/activate_this.py'
# with open(activate_this) as file_:
#     exec(file_.read(), dict(__file__=activate_this))
#
##  2- set a python path
# sys.path.insert(0, '/var/www/html/app-web/')
#
##  3- set some logging facilities
# import logging, sys
# logging.basicConfig(stream=sys.stderr)

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

#
# Main Part
#

# simply use application already set in main app file
#
from app import create_app


application = create_app()


# vim: ft=python