Files
WebNationsGlory_ServeurBuil…/Dockerfile

21 lines
428 B
Docker

FROM node:18-alpine
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"]