diff --git a/app/passenger_wsgi.py b/app/passenger_wsgi.py index 7fe947b..9d3ebd1 100644 --- a/app/passenger_wsgi.py +++ b/app/passenger_wsgi.py @@ -1,14 +1,23 @@ #!/usr/bin/env python3 -"Script to run Haldis on a server" +""" +Used by Zeus in production. +This script makes Haldis acceptable to Phusion Passenger assuming a setup like on Zeus servers. +""" + +# pylint: disable=wrong-import-position import os import sys +# User has the virtual environment in ~/env/ INTERP = os.path.expanduser("~/env/bin/python3") if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv) sys.path.append(os.getcwd()) + +# Phusion Passenger expects this file to be called `passenger_wsgi.py` +# and the WSGI object to be called `application` from app import app as application # For running on the server with passenger etc