From b2b6461f6913ca1251b9859f911e027e22b29fcd Mon Sep 17 00:00:00 2001 From: Richard Hitier Date: Thu, 1 Sep 2022 10:42:35 +0200 Subject: [PATCH] Add wsgi script --- heliopropa.wsgi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+), 0 deletions(-) create mode 100644 heliopropa.wsgi diff --git a/heliopropa.wsgi b/heliopropa.wsgi new file mode 100644 index 0000000..42bda7f --- /dev/null +++ b/heliopropa.wsgi @@ -0,0 +1,42 @@ +# +# 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 web.run import app as application + + + + +# vim: ft=python -- libgit2 0.21.2