Dernier reliquat de l'A35 (docs/périmètre dérivés) : - Dockerfile : python:3.12-slim → python:3.13-slim (builder + runtime) - .gitea/workflows/ci.yml : python-version '3.12' → '3.13' (lint + test) - README.md : « Python 3.12 » et « python:3.12-slim » → 3.13 (×2) - pyproject.toml : ruff target-version py312 → py313 (0 nouvelle remarque ruff) - zéro référence 3.12 résiduelle ; uv.lock (requires-python >=3.13) et le venv (3.13.14) étaient déjà bons Validation (le point laissé « à faire par un rebuild d'image ») : - docker build VERT sur python:3.13-slim → image flowdeck:a35-py313 - dans le conteneur : python -V = 3.13.16, `import app.main` OK (v7.35.0) → wheels requirements.txt construits + importables sur 3.13 A35 = TERMINÉ (OpenAPI/README/titre dupliqué faits en 7.3.9 + drift). suite **1093/1093** · ruff OK (target py313) · docs à jour
44 lines
1.6 KiB
Docker
44 lines
1.6 KiB
Docker
# ═══════════════════════════════════════════════════════════
|
|
# FlowDeck — multi-stage Docker build (v5.2.0)
|
|
# Stage 1 "builder": build Python wheels once.
|
|
# Stage 2 "runtime": minimal image with WeasyPrint system libs.
|
|
# ═══════════════════════════════════════════════════════════
|
|
FROM python:3.13-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip wheel --no-cache-dir --wheel-dir /wheels -r requirements.txt
|
|
|
|
# ── runtime stage ───────────────────────────────────────────
|
|
FROM python:3.13-slim AS runtime
|
|
|
|
WORKDIR /app
|
|
|
|
# WeasyPrint PDF: text layout (pango/harfbuzz), image decoding, fonts,
|
|
# colour emoji support. curl = healthcheck.
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
libpango-1.0-0 \
|
|
libpangoft2-1.0-0 \
|
|
libharfbuzz0b \
|
|
libffi-dev \
|
|
libgdk-pixbuf-2.0-0 \
|
|
shared-mime-info \
|
|
fonts-dejavu-core \
|
|
fonts-noto-color-emoji \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /wheels /wheels
|
|
RUN pip install --no-cache-dir /wheels/* && rm -rf /wheels
|
|
|
|
COPY . .
|
|
|
|
RUN mkdir -p /data /data/backups
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:8080/api/health || exit 1
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080", "--proxy-headers", "--forwarded-allow-ips", "*"] |