fix(admin-web): Dockerfile 构建时传入 SNAPSHOT_SERVICE_URL build arg
Next.js rewrites 在构建阶段烘焙,运行时环境变量不生效 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
de361e24f6
commit
ff28615fc3
|
|
@ -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
|
||||
|
||||
# 构建应用
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue