Files
2026-03-16 16:35:08 +09:00

25 lines
624 B
Docker

# 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;"]