# Build stage FROM node:20-alpine AS build WORKDIR /app ARG VITE_WS_URL COPY package.json package-lock.json ./ COPY shared/package.json shared/ COPY server/package.json server/ COPY web/package.json web/ RUN npm ci COPY tsconfig.base.json ./ COPY shared/ shared/ COPY web/ web/ RUN npm run build -w shared && cd web && npx vite build # Runtime stage FROM nginx:alpine COPY web/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/web/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]