Fix security vulnerabilities. Add logging

This commit is contained in:
Ettore
2026-05-09 17:52:59 +02:00
parent d803e2d7f6
commit 69e4f594de
14 changed files with 226 additions and 72 deletions

View File

@@ -1,6 +1,11 @@
# Use Python 3.11 slim image
FROM python:3.11-slim
# Ensure Python output is sent straight to stdout/stderr (no buffering),
# which is required for logs to appear in `docker logs`.
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# Set working directory
WORKDIR /app
@@ -17,8 +22,8 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY src/ ./src/
COPY data/ ./data/
# Create data directory if it doesn't exist
RUN mkdir -p data
# Create data and log directories if they don't exist
RUN mkdir -p data logs
# Expose port
EXPOSE $APP_PORT