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