- SetupWizardPage: step-by-step config (DB, admin, project) - Connects directly to AbstractWizard via SSH tunnel (127.0.0.1) - App.tsx: detect backend health, show wizard if not ready - Auto-switch wizard to readonly after setup - Add VITE_WIZARD_PORT build arg - Add vite-env.d.ts for type safety
20 lines
471 B
Docker
20 lines
471 B
Docker
# Build stage
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install
|
|
COPY . .
|
|
ARG VITE_API_BASE=/api
|
|
ARG VITE_WIZARD_PORT=18080
|
|
ENV VITE_API_BASE=$VITE_API_BASE
|
|
ENV VITE_WIZARD_PORT=$VITE_WIZARD_PORT
|
|
RUN npm run build
|
|
|
|
# Production stage — lightweight static server, no nginx
|
|
FROM node:20-alpine
|
|
RUN npm install -g serve@14
|
|
WORKDIR /app
|
|
COPY --from=build /app/dist ./dist
|
|
EXPOSE 3000
|
|
CMD ["serve", "-s", "dist", "-l", "3000"]
|