From d5e330b99fcac54c31bb627bcd74b5d78e5cfa1a Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Tue, 8 Jan 2019 09:17:42 +0100
Subject: [PATCH] Use gunicorn instead of flask

---
 Makefile.in      | 5 ++++-
 requirements.txt | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 requirements.txt

diff --git a/Makefile.in b/Makefile.in
index f01f021..ccbad3f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -8,6 +8,9 @@ endif
 
 default: start
 
+build:
+	pip install -Ur requirements.txt
+
 start: 
 	@echo Creating tmux session...
 
@@ -35,7 +38,7 @@ start:
 	@echo Starting the web server on 0.0.0.0:${WEBSERVER_PORT}
 	@#
 	@tmux send-keys -t ${SESSION_NAME}:main.3  \
-	    "FLASK_APP=km3mon.py flask run --host=0.0.0.0 --port=${WEBSERVER_PORT}" Enter
+	    "gunicorn -w 4 -b 0.0.0.0:${WEBSERVER_PORT} km3mon:app" Enter
 	@tmux select-layout even-vertical
 
 	@echo Starting the monitoring scripts
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..1aaebc4
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+km3pipe
+flask
+gunicorn
-- 
GitLab