From 69f98cde9eb21494fdcd5e272b9d60dfa178adec Mon Sep 17 00:00:00 2001 From: redfast00 Date: Wed, 11 Sep 2019 22:47:06 +0200 Subject: [PATCH] Fix wsgi for server deploy --- app/passenger_wsgi.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/passenger_wsgi.py b/app/passenger_wsgi.py index 611b2e4..5e2534c 100644 --- a/app/passenger_wsgi.py +++ b/app/passenger_wsgi.py @@ -1,18 +1,16 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys -from app import create_app - -INTERP = os.path.expanduser("~/env/bin/python") +INTERP = os.path.expanduser("~/env/bin/python3") if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv) sys.path.append(os.getcwd()) - -application = create_app() +from app import create_app +application = create_app().app # For running on the server with passenger etc if __name__ == "__main__": - application.run(port=8000) + application.run()