Fix security vulnerabilities. Add logging
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user