From 96225145c1422b1ca810077a8a1ba740d2380fb0 Mon Sep 17 00:00:00 2001 From: br0tkasten Date: Tue, 1 Jun 2021 10:21:59 +0000 Subject: [PATCH] add wsgi handler --- app.sh | 7 +++++++ wsgi.py | 4 ++++ 2 files changed, 11 insertions(+) create mode 100755 app.sh create mode 100644 wsgi.py diff --git a/app.sh b/app.sh new file mode 100755 index 0000000..5e62949 --- /dev/null +++ b/app.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +BASE=$(dirname $0) +cd $BASE +source env/bin/activate +pip3 install -r requirements.txt +gunicorn -D --bind 0.0.0.0:80 --pid /var/run/webapp.pid wsgi:app diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..6026b0f --- /dev/null +++ b/wsgi.py @@ -0,0 +1,4 @@ +from app import app + +if __name__ == "__main__": + app.run()