FROM node:22-alpine AS build

WORKDIR /src
COPY backend/web/package*.json ./
RUN npm ci
COPY backend/web/ ./
RUN npm run build

FROM nginx:1.27-alpine

COPY deploy/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /src/dist /usr/share/nginx/html
EXPOSE 80
