Add VITE_WIZARD_HOST env variable
This commit is contained in:
@@ -5,7 +5,9 @@ COPY package.json package-lock.json* ./
|
|||||||
RUN npm install
|
RUN npm install
|
||||||
COPY . .
|
COPY . .
|
||||||
ARG VITE_WIZARD_PORT=18080
|
ARG VITE_WIZARD_PORT=18080
|
||||||
|
ARG VITE_WIZARD_HOST=wizard
|
||||||
ENV VITE_WIZARD_PORT=$VITE_WIZARD_PORT
|
ENV VITE_WIZARD_PORT=$VITE_WIZARD_PORT
|
||||||
|
ENV VITE_WIZARD_HOST=$VITE_WIZARD_HOST
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Production stage — lightweight static server, no nginx
|
# Production stage — lightweight static server, no nginx
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ import MonitorPage from '@/pages/MonitorPage'
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
const WIZARD_PORT = Number(import.meta.env.VITE_WIZARD_PORT) || 18080
|
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'
|
type AppState = 'checking' | 'setup' | 'ready'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user