FROM node:22-alpine

WORKDIR /app

# Install build dependencies for isolated-vm (needs python, make, g++)
RUN apk add --no-cache python3 make g++ curl

COPY package*.json ./
RUN npm ci

COPY . .
RUN npm run build

EXPOSE 3100

CMD ["npm", "start"]
