FROM node:24-alpine

WORKDIR /app

ENV CXXFLAGS="-std=c++20"

COPY package*.json ./

RUN apk add --no-cache python3 make g++ \
  && npm install --production

COPY . .

RUN mkdir -p /app/data

EXPOSE 3000

CMD ["node", "server.js"]
