From f7a19c71d683400172c97e934f1e4ec019a31237 Mon Sep 17 00:00:00 2001 From: Zhi Date: Fri, 13 Mar 2026 19:43:04 +0000 Subject: [PATCH] Add VITE_WIZARD_HOST env variable --- Dockerfile | 2 ++ src/App.tsx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6fed7ee..432cd88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/src/App.tsx b/src/App.tsx index d1d5982..b5a4c25 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -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'