21 lines
426 B
Docker
21 lines
426 B
Docker
FROM node:18-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY backend/package*.json ./
|
|
|
|
# Install dependencies (sans --production pour installer toutes les dépendances)
|
|
RUN npm install
|
|
|
|
# Verify dependencies are installed
|
|
RUN npm list express > /dev/null 2>&1 || (echo "ERROR: express not installed" && exit 1)
|
|
|
|
# Copy application code
|
|
COPY backend/src ./src
|
|
COPY frontend ./frontend
|
|
|
|
EXPOSE 4001
|
|
|
|
CMD ["node", "src/server.js"]
|