FROM node:21.6 AS build-stage

WORKDIR /app

COPY package.json ./

RUN npm install

COPY src/ src/
COPY public/ public/
COPY babel.config.js ./
COPY jsconfig.json ./
COPY vue.config.js ./

RUN npm run build


FROM caddy:2.8 AS production-stage

COPY --from=build-stage /app/dist /var/www/html
