update
Some checks failed
deploy / deploy (push) Has been cancelled

This commit is contained in:
toom1996
2026-08-23 00:58:33 +08:00
parent c8d9735751
commit b274ccdfec
21 changed files with 612 additions and 380 deletions

View File

@ -16,9 +16,16 @@ HASHID_SECRET=change-me-in-prod-hashid
# ---- SSG 内部接口令牌(可选)----
# SSG_TOKEN=some-long-random-token
# ---- 前端开发/构建变量(本地 astro dev / 本地 build 用;Docker 部署见 Dockerfile/docker-compose)----
# 公开/运行期接口基址(浏览器运行期 + 按需渲染 SSR)。空 = 同源 /api。
# 本地联调后端时填 http://localhost:8090;生产可置空走同源。
#BASE_API=http://localhost:8090
# 构建期 SSG 内部端口基址,指向后端独立的 SSG 内部端口(只绑宿主回环,nginx 不反代)。
#BASE_API_SSG=http://localhost:8091
# 说明:
# - 前端运行期走同源 /api(nginx 反代到 backend:8090),PUBLIC_API_BASE 在 Dockerfile 中置空
# - 前端构建期(SSG)通过 compose 的 build.args.SSG_API=http://localhost:8091 拉数据,
# - 前端运行期走同源 /api(nginx 反代到 backend:8090),BASE_API 在 Dockerfile 中置空
# - 前端构建期(SSG)通过 compose 的 build.args.BASE_API_SSG=http://localhost:8091 拉数据,
# 指向后端独立的 SSG 内部端口(只绑宿主回环,nginx 不反代)
# - 若后端 SSG_TOKEN 非空,前端构建需传相同 SSG_TOKEN(compose 已对齐)
# - backend 监听 8090 对外 + 8091 对内;生产建议去掉 8090 的 ports 暴露