Files
HarborForge.Frontend/Dockerfile
zhi c92e399218 fix: check wizard config for initialized flag instead of backend health
- App checks wizard API for harborforge.json config with initialized=true
- If not initialized, show embedded setup wizard (talks to wizard API via CORS)
- Setup saves config with initialized:true to wizard config volume
- After restart, backend reads config and starts, frontend sees initialized=true
- Remove VITE_API_BASE build arg (not needed, api.ts uses /api relative path)
- Fix Object.entries null crash in DashboardPage
2026-03-11 10:09:33 +00:00

18 lines
415 B
Docker

# Build stage
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm install
COPY . .
ARG VITE_WIZARD_PORT=18080
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"]