# Separate StemEngine WebUI container # Builds the React frontend and serves it with nginx. FROM node:20-alpine AS build WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . # Default backend endpoint used when no browser override is configured. ARG VITE_STEMENGINE_API_BASE=http://localhost:8000 ENV VITE_STEMENGINE_API_BASE=${VITE_STEMENGINE_API_BASE} # Build to local dist folder (not backend/static) RUN npx vite build --outDir dist FROM nginx:1.27-alpine COPY docker/nginx-webui.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]