# STEP 1 — Build static files
FROM node:18 AS build
WORKDIR /app

COPY package.json ./
RUN npm install --force

COPY . .
RUN npm run build

# STEP 2 — Nginx to serve static build
FROM nginx:1.25
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
