fix: use backend:8000 for container network in wizard default

This commit is contained in:
2026-03-15 13:36:27 +00:00
parent fb02808666
commit 1d74917899
3 changed files with 4 additions and 9 deletions

2
.env Normal file
View File

@@ -0,0 +1,2 @@
VITE_API_BASE=http://backend:8000
VITE_WIZARD_PORT=8080

View File

@@ -3,13 +3,6 @@ FROM node:20-alpine AS build
WORKDIR /app WORKDIR /app
COPY package.json package-lock.json* ./ COPY package.json package-lock.json* ./
RUN npm install RUN npm install
# Set build args and env vars BEFORE copying source code
ARG VITE_WIZARD_PORT=18080
ARG VITE_API_BASE
ENV VITE_WIZARD_PORT=$VITE_WIZARD_PORT
ENV VITE_API_BASE=$VITE_API_BASE
COPY . . COPY . .
RUN npm run build RUN npm run build

View File

@@ -38,7 +38,7 @@ export default function SetupWizardPage({ wizardBase, onComplete }: Props) {
db_user: 'harborforge', db_user: 'harborforge',
db_password: 'harborforge_pass', db_password: 'harborforge_pass',
db_database: 'harborforge', db_database: 'harborforge',
backend_base_url: 'http://127.0.0.1:8000', backend_base_url: 'http://backend:8000',
project_name: '', project_name: '',
project_description: '', project_description: '',
}) })
@@ -182,7 +182,7 @@ export default function SetupWizardPage({ wizardBase, onComplete }: Props) {
<h2>Backend URL</h2> <h2>Backend URL</h2>
<p className="text-dim">Configure the HarborForge backend API URL</p> <p className="text-dim">Configure the HarborForge backend API URL</p>
<div className="setup-form"> <div className="setup-form">
<label>Backend Base URL <input value={form.backend_base_url} onChange={(e) => set('backend_base_url', e.target.value)} placeholder="http://127.0.0.1:8000" /></label> <label>Backend Base URL <input value={form.backend_base_url} onChange={(e) => set('backend_base_url', e.target.value)} placeholder="http://backend:8000" /></label>
</div> </div>
<div className="setup-nav"> <div className="setup-nav">
<button className="btn-back" onClick={() => setStep(2)}>Back</button> <button className="btn-back" onClick={() => setStep(2)}>Back</button>