- Python base image 3.12-slim -> 3.14-slim - fastapi 0.136.3 -> 0.162.0, sqlalchemy 2.0.50 -> 2.1.6 - Replace unmaintained python-jose with PyJWT 2.15.1; tokens issued by python-jose remain valid, so existing sessions are not logged out - MySQL 8.0.46 (EOL) -> 8.4.13 LTS; in-place data dictionary upgrade runs automatically on first start Co-Authored-By: Claude Opus 5.5 <[email protected]>
15 lines
342 B
Docker
15 lines
342 B
Docker
FROM python:3.14-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
# Run as a non-root user — no reason for a web process to have root privileges
|
|
RUN adduser --disabled-password --no-create-home appuser
|
|
USER appuser
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|