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