From 9f4007c0e9db38cf1dcde40de6d7c77a3ee8bfdd Mon Sep 17 00:00:00 2001 From: cato447 Date: Wed, 22 Apr 2026 13:29:23 +0200 Subject: [PATCH] removed multiple workers as they do not work well with flask --- app/Dockerfile | 2 +- app/__init__.py | 2 +- docker-compose.yml | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index e2393c3..a6ab736 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -38,4 +38,4 @@ COPY --from=css-builder /build/static/css/output.css ./app/static/css/output.css EXPOSE 5000 # Gunicorn command -CMD ["gunicorn", "-w", "4", "--worker-class", "eventlet", "-b", "0.0.0.0:5000", "app.wsgi:app"] +CMD ["gunicorn", "-w", "1", "--worker-class", "eventlet", "-b", "0.0.0.0:5000", "app.wsgi:app"] diff --git a/app/__init__.py b/app/__init__.py index fe40b6d..b500ed4 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -11,7 +11,7 @@ from app.auth import init_auth from app.seed_db import seed_courses from app.config import Config -socketio = SocketIO(async_mode='eventlet', cors_allowed_origins="*", message_queue='redis://redis:6379') +socketio = SocketIO(async_mode='eventlet', cors_allowed_origins="*") def create_app(config_class=Config): # 1. Setup Log Directory diff --git a/docker-compose.yml b/docker-compose.yml index a9ec711..42ee27d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,10 +31,6 @@ services: condition: service_started restart: on-failure - redis: - image: redis:alpine - restart: unless-stopped - prometheus: image: prom/prometheus:latest restart: unless-stopped