From 3b9680455cba20ca272aa874bf782cf7600235fa Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 8 Feb 2026 01:16:31 -0600 Subject: [PATCH] v0.17.1 - added Gunicorn to Docker --- Dockerfile | 7 +++++-- app.py | 2 +- requirements.txt | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ce3bec5..9ea3057 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,15 @@ FROM python:3.13-slim - WORKDIR /app +# Copy requirements first (better layer caching) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt +# Copy application code COPY . . +# Expose port EXPOSE 5000 -CMD ["python", "app.py"] \ No newline at end of file +# Run with Gunicorn +CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "4", "--timeout", "120", "--access-logfile", "-", "--error-logfile", "-", "app:app"] \ No newline at end of file diff --git a/app.py b/app.py index 252954a..a8e0954 100644 --- a/app.py +++ b/app.py @@ -28,7 +28,7 @@ app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(hours=1) # 1. Define the version -APP_VERSION = '0.17.0' # Bumped version for modular architecture +APP_VERSION = '0.17.1' # Bumped version for modular architecture # 2. Inject it into all templates automatically @app.context_processor diff --git a/requirements.txt b/requirements.txt index 746f31f..21e71e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ Flask==3.1.2 Werkzeug==3.1.5 openpyxl -Pillow \ No newline at end of file +Pillow +gunicorn==21.2.0 \ No newline at end of file