v0.17.1 - added Gunicorn to Docker

This commit is contained in:
Javier
2026-02-08 01:16:31 -06:00
parent 56b0d6d398
commit 3b9680455c
3 changed files with 8 additions and 4 deletions

View File

@@ -1,12 +1,15 @@
FROM python:3.13-slim FROM python:3.13-slim
WORKDIR /app WORKDIR /app
# Copy requirements first (better layer caching)
COPY requirements.txt . COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . . COPY . .
# Expose port
EXPOSE 5000 EXPOSE 5000
CMD ["python", "app.py"] # Run with Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "4", "--timeout", "120", "--access-logfile", "-", "--error-logfile", "-", "app:app"]

2
app.py
View File

@@ -28,7 +28,7 @@ app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(hours=1)
# 1. Define the version # 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 # 2. Inject it into all templates automatically
@app.context_processor @app.context_processor

View File

@@ -2,3 +2,4 @@ Flask==3.1.2
Werkzeug==3.1.5 Werkzeug==3.1.5
openpyxl openpyxl
Pillow Pillow
gunicorn==21.2.0