fix: exclure backend/node_modules du .dockerignore et simplifier Dockerfile
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
node_modules
|
||||
backend/node_modules
|
||||
frontend/node_modules
|
||||
npm-debug.log
|
||||
.git
|
||||
.gitignore
|
||||
|
||||
11
Dockerfile
11
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user