summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Grote2023-04-13 14:58:39 +0200
committerMichael Grote2023-04-13 14:58:39 +0200
commit1950d759baefe243d391cd63cd07b4973c46d362 (patch)
tree07975f53461592e9a849594b3aadd649a219548f
parente15c6e472713206521e1013807e637a7f31badbd (diff)
add gunicorn 2
-rw-r--r--Dockerfile4
-rw-r--r--gunicorn_config.py3
-rw-r--r--wsgi.py4
3 files changed, 6 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index e29bb9d..bb48283 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,4 +19,6 @@ RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 5000
-CMD [ "python3", "-m" , "flask", "run", "--port", "5000", "--host", "0.0.0.0"]
+
+#CMD [ "python3", "-m" , "flask", "run", "--port", "5000", "--host", "0.0.0.0"]
+CMD [ "python3", "-m" , "gunicorn", "app:app", "-c", "gunicorn_config.py"]
diff --git a/gunicorn_config.py b/gunicorn_config.py
new file mode 100644
index 0000000..c7342ad
--- /dev/null
+++ b/gunicorn_config.py
@@ -0,0 +1,3 @@
+bind = "0.0.0.0:5000"
+workers = 2
+threads = 4
diff --git a/wsgi.py b/wsgi.py
deleted file mode 100644
index 08f9dd1..0000000
--- a/wsgi.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from app import app
-
-if __name__ == '__main__':
- app.run()