Last active
June 11, 2024 14:46
-
-
Save prochor666/a367a9ebd7cf67f04668 to your computer and use it in GitHub Desktop.
Create & run python/wsgi app on Ispconfig 3 / Debian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# place thi s file into the web dir | |
# install Flask foundation + dependencies | |
cd .. | |
git clone https://github.com/JackStouffer/Flask-Foundation.git web | |
cd web | |
make deps | |
wget https://gist.github.com/prochor666/a367a9ebd7cf67f04668/raw/6516a8dd3c90c808c5f2c81f67481a4fd48126f6/manage.wsgi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# webXX - replace with ispconfig user | |
# clientXX - replace with ispconfig group | |
WSGIDaemonProcess webXX user=webXX group=clientXX threads=5 | |
<Directory /var/www/clients/clientXX/webXX/web/> | |
WSGIProcessGroup webXX | |
WSGIApplicationGroup %{GLOBAL} | |
Order deny,allow | |
Options +ExecCGI | |
Allow from all | |
</Directory> | |
WSGIScriptAlias / /var/www/clients/clientXX/webXX/web/manage.wsgi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from os import path as op | |
APPROOT = op.abspath(op.dirname(__file__)) | |
if not APPROOT in sys.path: | |
sys.path.insert(0, APPROOT) | |
from appname import create_app | |
env = os.environ.get('APPNAME_ENV', 'dev') | |
application = create_app('appname.settings.%sConfig' % env.capitalize(), env=env) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment