# ai-web — node build, nginx serve. FROM node:22-alpine AS build WORKDIR /app COPY package.json ./ RUN npm install COPY . . # Where the browser should send /ask. Empty means the built-in default, which # is the public hostname. A tunnelled demo build overrides it: # --build-arg VITE_API_BASE=http://localhost:8001 # Vite inlines this at BUILD time, so a change needs a rebuild, not a restart. ARG VITE_API_BASE="" ENV VITE_API_BASE=$VITE_API_BASE RUN npm run build FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80