From 21419fda95f29736a0e34ab3acad9f2c75682bb9 Mon Sep 17 00:00:00 2001 From: kinou-p Date: Thu, 2 Oct 2025 17:04:30 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Corriger=20le=20Dockerfile=20pour=20le?= =?UTF-8?q?=20build=20avec=20toutes=20les=20d=C3=A9pendances?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 7 +++++-- Dockerfile | 11 +++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9ba210f..43f0e84 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,10 +6,13 @@ npm-debug.log .env.local .env*.local dist -README.md .vscode .idea -*.md .DS_Store *.log test + +# Documentation (optionnel, mais garde les fichiers de config) +README.md +PORTAINER_*.md +SECURITY_GUIDE.md diff --git a/Dockerfile b/Dockerfile index 5364d05..e4413f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,15 @@ FROM node:18-alpine AS builder WORKDIR /app +# Installer les dépendances système nécessaires +RUN apk add --no-cache git + # Copier les fichiers de dépendances COPY package*.json ./ +COPY bun.lockb* ./ -# Installer les dépendances -RUN npm ci --only=production +# Installer TOUTES les dépendances (y compris devDependencies pour le build) +RUN npm ci || npm install # Copier le code source COPY . . @@ -15,6 +19,9 @@ COPY . . # Build l'application en mode production RUN npm run build +# Vérifier que le dossier dist existe +RUN ls -la /app/dist + # Étape 2: Production avec Nginx FROM nginx:alpine