Files
WebNationsGlory_ServeurBuil…/Dockerfile

19 lines
375 B
Docker

FROM node:18-alpine
WORKDIR /app
# Copy package files
COPY backend/package*.json ./
# Install dependencies
RUN npm install --production --no-audit --no-fund && \
if [ ! -d node_modules/express ]; then echo "ERROR: express not installed" && exit 1; fi
# Copy application code
COPY backend/src ./src
COPY frontend ./frontend
EXPOSE 4001
CMD ["node", "src/server.js"]