diff --git a/Dockerfile b/Dockerfile index 1a8ec60..85db888 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,11 @@ FROM node:20-alpine AS builder WORKDIR /app # Corepack applique la version de pnpm verrouillée dans package.json. -RUN npm install -g corepack@latest && corepack enable -COPY . . +RUN corepack enable +COPY package.json pnpm-lock.yaml ./ +COPY patches ./patches RUN pnpm install --frozen-lockfile +COPY . . # Les variables Vite doivent être disponibles pendant la compilation frontend. ARG VITE_APP_ID @@ -26,6 +28,9 @@ ENV VITE_APP_ID=${VITE_APP_ID} \ VITE_APP_LOGO=${VITE_APP_LOGO} RUN pnpm run build +# L’image d’exécution n’embarque ni TypeScript, ni Vite, ni les outils de test. +RUN pnpm prune --prod + FROM node:20-alpine AS runner WORKDIR /app diff --git a/client/index.html b/client/index.html index e2efb24..685ca23 100644 --- a/client/index.html +++ b/client/index.html @@ -6,9 +6,9 @@ - - -