fix: améliorer Dockerfile avec .dockerignore et logs de débogage

This commit is contained in:
y.campiontrebouta@innotexnas.ovh
2026-02-05 00:09:05 +01:00
parent 47ba0ca477
commit 679244da22
2 changed files with 20 additions and 1 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
node_modules
npm-debug.log
.git
.gitignore
README.md
.env
.DS_Store
*.md
.cleanup-report.md

View File

@@ -2,13 +2,23 @@ FROM node:18-alpine
WORKDIR /app
# Copy package files
COPY backend/package*.json ./
RUN npm install --production && npm cache clean --force
# Install dependencies with verbose output for debugging
RUN echo "Installing dependencies..." && \
npm install --production && \
echo "Dependencies installed successfully" && \
npm list --production && \
npm cache clean --force
# Copy application code
COPY backend/src ./src
COPY frontend ./frontend
# Verify express was installed
RUN ls -la node_modules | grep express || echo "WARNING: express not found in node_modules"
EXPOSE 4001
CMD ["node", "src/server.js"]