# Build stage
FROM node:25.8.2-alpine3.23 AS build
WORKDIR /app

COPY package.json /app/package.json
RUN npm install

COPY . /app
RUN npm run build

# Runtime stage
FROM nginx:1.28.3-alpine3.23
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
