Files
frontend_v2/.env.example
toom1996 b274ccdfec
Some checks failed
deploy / deploy (push) Has been cancelled
update
2026-08-23 00:58:33 +08:00

32 lines
1.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 复制为 .env 后按需修改(docker-compose 自动读取)
# 注意:不要提交真实密钥;.env 已在 .dockerignore 中排除
# ---- 后端数据库 ----
DB_PASSWORD=root
DB_USER=root
DB_NAME=fashionadmin
# ---- 后端 JWT 密钥(生产务必改为随机长字符串)----
JWT_SECRET=change-me-in-prod
# ---- 公开 ID 混淆盐值(生产务必改为随机串)----
# 决定对外 id/brand_id 编码结果;变更会使线上旧链接全部失效,一旦上生产请固定。
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),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 暴露