# Fastify API — no build step, runs server.mjs directly
FROM node:22-alpine
WORKDIR /app

RUN corepack enable && corepack prepare pnpm@latest --activate

COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod

COPY server.mjs ./

ENV NODE_ENV=production
EXPOSE 3000

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