From 1fdc7889cf655455c365b4bc11a04e1bc3191be6 Mon Sep 17 00:00:00 2001 From: Rien Maertens Date: Wed, 13 Feb 2019 21:00:13 +0100 Subject: [PATCH] Server stuff --- .gitignore | 1 + passenger_wsgi.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100755 passenger_wsgi.py diff --git a/.gitignore b/.gitignore index 0f7c670..79a1562 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ config.py venv/ +passenger.3000.pid.lock # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/passenger_wsgi.py b/passenger_wsgi.py new file mode 100755 index 0000000..1bdb1c1 --- /dev/null +++ b/passenger_wsgi.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 + +import sys +import os + +INTERP = os.path.expanduser("~/env/bin/python3") +if sys.executable != INTERP: + os.execl(INTERP, INTERP, *sys.argv) + +sys.path.append(os.getcwd()) + +from app import app as application