FROM node:22-alpine AS builder

WORKDIR /app
COPY docs/package.json docs/package-lock.json ./
RUN npm ci

COPY docs/ .
RUN npm run build

FROM nginx:alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY docs/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/.vitepress/dist /usr/share/nginx/html
EXPOSE 80

