FROM node:21 AS build
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
RUN npm install
COPY . ./
RUN npm run build
RUN npm install --global http-server
EXPOSE 8000
CMD ["npm", "run", "preview", "--", "--host", "--port", "8000"]