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 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()