fix: exclure backend/node_modules du .dockerignore et simplifier Dockerfile

This commit is contained in:
y.campiontrebouta@innotexnas.ovh
2026-02-05 00:12:32 +01:00
parent 679244da22
commit b3f868e134
2 changed files with 4 additions and 9 deletions

View File

@@ -1,4 +1,6 @@
node_modules
backend/node_modules
frontend/node_modules
npm-debug.log
.git
.gitignore

View File

@@ -5,20 +5,13 @@ WORKDIR /app
# Copy package files
COPY backend/package*.json ./
# 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
# Install dependencies cleanly
RUN npm install --production
# 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"]