Checkpoint avant migration v1 (Flask) -> v2 (FastAPI + Vue.js)

This commit is contained in:
2025-11-25 21:04:47 +01:00
parent 75b03c24ed
commit 60c60c1605
4015 changed files with 441464 additions and 446 deletions

View File

@@ -12,23 +12,27 @@ ENV FLASK_ENV=production
# Installation d'uv depuis l'image officielle
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Installation des dépendances avec cache mount (avant changement d'utilisateur)
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev
# Création d'un utilisateur non-root
RUN adduser --disabled-password --gecos '' --shell /bin/bash notytex \
&& chown -R notytex:notytex /app
USER notytex
RUN adduser --disabled-password --gecos '' --shell /bin/bash notytex
# Définition du répertoire de travail
WORKDIR /app
RUN chown -R notytex:notytex /app
USER notytex
# Copie des fichiers de configuration
COPY --chown=notytex:notytex pyproject.toml uv.lock ./
# Installation des dépendances avec cache mount
RUN --mount=type=cache,target=/home/notytex/.cache/uv \
uv sync --frozen --no-dev --no-install-project
# Copie du code source
COPY --chown=notytex:notytex . .
# Installation du projet dans l'environnement virtuel
RUN uv sync --frozen --no-dev
# Création des répertoires nécessaires (volumes seront montés)
RUN mkdir -p instance logs