Fix wsgi for server deploy

This commit is contained in:
redfast00 2019-09-11 22:47:06 +02:00
parent a44f02e2c7
commit 69f98cde9e
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C

View file

@ -1,18 +1,16 @@
#!/usr/bin/env python #!/usr/bin/env python3
import os import os
import sys import sys
from app import create_app INTERP = os.path.expanduser("~/env/bin/python3")
INTERP = os.path.expanduser("~/env/bin/python")
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())
from app import create_app
application = create_app() application = create_app().app
# For running on the server with passenger etc # For running on the server with passenger etc
if __name__ == "__main__": if __name__ == "__main__":
application.run(port=8000) application.run()