Add VITE_WIZARD_HOST env variable

This commit is contained in:
Zhi
2026-03-13 19:43:04 +00:00
parent 0f80cab421
commit f7a19c71d6
2 changed files with 4 additions and 1 deletions

View File

@@ -5,7 +5,9 @@ COPY package.json package-lock.json* ./
RUN npm install
COPY . .
ARG VITE_WIZARD_PORT=18080
ARG VITE_WIZARD_HOST=wizard
ENV VITE_WIZARD_PORT=$VITE_WIZARD_PORT
ENV VITE_WIZARD_HOST=$VITE_WIZARD_HOST
RUN npm run build
# Production stage — lightweight static server, no nginx

View File

@@ -18,7 +18,8 @@ import MonitorPage from '@/pages/MonitorPage'
import axios from 'axios'
const WIZARD_PORT = Number(import.meta.env.VITE_WIZARD_PORT) || 18080
const WIZARD_BASE = `http://127.0.0.1:${WIZARD_PORT}`
const WIZARD_HOST = import.meta.env.VITE_WIZARD_HOST || "wizard"
const WIZARD_BASE = `http://${WIZARD_HOST}:${WIZARD_PORT}`
type AppState = 'checking' | 'setup' | 'ready'