Fix wsgi for server deploy
This commit is contained in:
parent
a44f02e2c7
commit
69f98cde9e
1 changed files with 5 additions and 7 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue