From 69ff89e461edd522d8148ade014e6fb4fbd4a26c Mon Sep 17 00:00:00 2001 From: Vy Vu <55815025+vudangbaovy@users.noreply.github.com> Date: Thu, 27 Mar 2025 13:17:34 -0400 Subject: [PATCH] run socketio server with eventlet instead of gunicorn server --- quantum_app_backend/dockerfile | 2 +- quantum_app_backend/gunicorn_config.py | 4 ---- quantum_app_backend/requirements.txt | 4 +++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/quantum_app_backend/dockerfile b/quantum_app_backend/dockerfile index a2e8ff1..566ff98 100644 --- a/quantum_app_backend/dockerfile +++ b/quantum_app_backend/dockerfile @@ -31,4 +31,4 @@ EXPOSE 3001 ENV FLASK_APP=app.py # Run the Flask app -CMD ["gunicorn","--config", "gunicorn_config.py", "app:app"] +CMD ["python3", "app.py"] diff --git a/quantum_app_backend/gunicorn_config.py b/quantum_app_backend/gunicorn_config.py index bd955b9..8c62b18 100644 --- a/quantum_app_backend/gunicorn_config.py +++ b/quantum_app_backend/gunicorn_config.py @@ -1,7 +1,5 @@ import os - - workers = int(os.environ.get('GUNICORN_PROCESSES', '2')) threads = int(os.environ.get('GUNICORN_THREADS', '4')) @@ -10,8 +8,6 @@ bind = os.environ.get('GUNICORN_BIND', '0.0.0.0:3001') - - forwarded_allow_ips = '*' secure_scheme_headers = { 'X-Forwarded-Proto': 'https' } \ No newline at end of file diff --git a/quantum_app_backend/requirements.txt b/quantum_app_backend/requirements.txt index c9c3d04..5069fba 100644 --- a/quantum_app_backend/requirements.txt +++ b/quantum_app_backend/requirements.txt @@ -27,4 +27,6 @@ matplotlib flask-pymongo dotenv flask-socketio -gunicorn==23.0.0 \ No newline at end of file +gunicorn==23.0.0 +eventlet==0.39.1 +greenlet==3.1.1 \ No newline at end of file