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 node_modules
backend/node_modules
frontend/node_modules
npm-debug.log npm-debug.log
.git .git
.gitignore .gitignore

View File

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