From ff28615fc3f2e29701b068060b75f64d16cd3fa1 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 24 Feb 2026 02:53:03 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-web):=20Dockerfile=20=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E4=BC=A0=E5=85=A5=20SNAPSHOT=5FSERVICE=5FURL?= =?UTF-8?q?=20build=20arg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Next.js rewrites 在构建阶段烘焙,运行时环境变量不生效 Co-Authored-By: Claude Opus 4.6 --- frontend/admin-web/Dockerfile | 2 +- frontend/admin-web/docker-compose.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/admin-web/Dockerfile b/frontend/admin-web/Dockerfile index 2bdeff6e..ea885a4c 100644 --- a/frontend/admin-web/Dockerfile +++ b/frontend/admin-web/Dockerfile @@ -22,7 +22,7 @@ ENV NEXT_TELEMETRY_DISABLED=1 ENV NODE_ENV=production # Next.js rewrite 在 build 时计算, 需要通过 ARG 传入后端服务地址 -ARG SNAPSHOT_SERVICE_URL=http://snapshot-service:3099 +ARG SNAPSHOT_SERVICE_URL=https://rwaapi.szaiai.com/snapshot-api ENV SNAPSHOT_SERVICE_URL=$SNAPSHOT_SERVICE_URL # 构建应用 diff --git a/frontend/admin-web/docker-compose.yml b/frontend/admin-web/docker-compose.yml index 63d87f1f..c951fc31 100644 --- a/frontend/admin-web/docker-compose.yml +++ b/frontend/admin-web/docker-compose.yml @@ -3,6 +3,8 @@ services: build: context: . dockerfile: Dockerfile + args: + SNAPSHOT_SERVICE_URL: https://rwaapi.szaiai.com/snapshot-api image: rwadurian-admin-web:latest container_name: rwadurian-admin-web restart: unless-stopped