FROM node:24.14-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN corepack enable
RUN pnpm install
COPY . .
RUN pnpm build

FROM nginx:stable-alpine AS runtime
COPY ./.deployment/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/.output/public /usr/share/nginx/html
EXPOSE 8080