FROM node:18-slim
WORKDIR /app
COPY backend/package*.json ./
RUN apt-get update && apt-get install -y --no-install-recommends python3 make g++ && rm -rf /var/lib/apt/lists/*
RUN npm ci --omit=dev
COPY backend/ .
COPY API/ /API/
RUN mkdir -p /app/data
EXPOSE 3001
CMD ["node", "server.js"]
