From 1dabd01ba74e4f53104eeabfa0b0b7b9137f5e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=9F=E4=BA=8C=E8=BF=9C?= Date: Wed, 8 Apr 2026 11:29:21 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E8=B0=83=E6=95=B4=E9=80=82=E9=85=8D?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E9=98=BF=E9=87=8C=E4=BA=91=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/Dockerfile | 2 +- web/src/bootstrap.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/Dockerfile b/web/Dockerfile index 3485713b..1d6bd8ff 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -10,7 +10,7 @@ FROM jsessh-registry.cn-shanghai.cr.aliyuncs.com/base-images/nginx-skillhub:alpi # 限制 envsubst 只替换 SKILLHUB_ 开头的变量,避免覆盖 nginx 的 $uri $host 等变量 # 设置默认值,部署时通过环境变量覆盖 -ENV SKILLHUB_API_UPSTREAM=${SKILLHUB_API_UPSTREAM:-http://sz-api.indusmind.local/skillhub-server} +ENV SKILLHUB_API_UPSTREAM=${SKILLHUB_API_UPSTREAM:-http://skillhub-server-dev:8000} COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/src/docs/skill.md.template /usr/share/nginx/html/registry/skill.md.template diff --git a/web/src/bootstrap.ts b/web/src/bootstrap.ts index b813de02..8c8ddc6c 100644 --- a/web/src/bootstrap.ts +++ b/web/src/bootstrap.ts @@ -7,8 +7,7 @@ async function loadRuntimeConfig() { await new Promise((resolve, reject) => { const script = document.createElement('script') - const base = new URL('./', document.baseURI).pathname - script.src = `${base}runtime-config.js` + script.src = '/runtime-config.js' script.async = false script.onload = () => resolve() script.onerror = () => reject(new Error('Failed to load runtime config'))