Better document Passenger file to avoid surprises
This commit is contained in:
parent
8a01e74323
commit
2d3ae10f90
1 changed files with 10 additions and 1 deletions
|
@ -1,14 +1,23 @@
|
||||||
#!/usr/bin/env python3
|
#!/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 os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
# User has the virtual environment in ~/env/
|
||||||
INTERP = os.path.expanduser("~/env/bin/python3")
|
INTERP = os.path.expanduser("~/env/bin/python3")
|
||||||
if sys.executable != INTERP:
|
if sys.executable != INTERP:
|
||||||
os.execl(INTERP, INTERP, *sys.argv)
|
os.execl(INTERP, INTERP, *sys.argv)
|
||||||
|
|
||||||
sys.path.append(os.getcwd())
|
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
|
from app import app as application
|
||||||
|
|
||||||
# For running on the server with passenger etc
|
# For running on the server with passenger etc
|
||||||
|
|
Loading…
Reference in a new issue