部署持久化 deploy/:目录结构 + 空 domains.json + 脱敏模板入库

- .gitignore 由整体排除 deploy/ 改为精确排除真实凭据(users.json/llm-upstreams.json)
  与 36MB 内置凭据镜像包(*.tar.gz),保留模板与空 domains.json 可入库
- 新增 users.json.example / llm-upstreams.json.example(占位符,部署时填真实凭据)
- 红线:admin 口令哈希/API Key、上游真 Key、镜像包 仍只进镜像/本地,不入库
This commit is contained in:
admin committed 2026-09-11 16:36:01 +08:00
1 parent 6955cf845e
commit 94a48bef6e
4 files changed
+27 -2

No files matched your search

+5 -2
View File
@@ -50,5 +50,8 @@ conf/tls/**/*.cer
conf/tls/**/*.crt
conf/tls/**/*.pem
# 种子数据含 API Key 与上游真 Key,只进镜像不入库
deploy/
# 部署种子数据:真实凭据与镜像只进镜像/本地,不入库;模板(.example)与空 domains.json 可入库
# users.json 含 admin 口令哈希 + API Key;llm-upstreams.json 含上游厂商真 Key;tar.gz 是内置凭据的镜像包
deploy/data-seed/users.json
deploy/data-seed/llm-upstreams.json
deploy/*.tar.gz
+1
View File
@@ -0,0 +1 @@
[]
@@ -0,0 +1,7 @@
{
"deepseek": {
"base": "https://api.deepseek.com/v1",
"auth": "Bearer <上游厂商真实 API Key,部署时填写,网关会原样转发到上游>",
"enabled": true
}
}
+14
View File
@@ -0,0 +1,14 @@
{
"admin": {
"username": "admin",
"role": "admin",
"salt": "<随机32位hex,部署时用 openssl rand -hex 16 生成>",
"pwd_hash": "<sha256(salt+password),部署时生成,例如:hashlib.sha256((salt+password).encode()).hexdigest()>",
"api_key": "<sk_开头的随机密钥,部署时生成,网关鉴权用>",
"allowed_models": [],
"llm_rpm": 60,
"llm_daily": 0,
"temp_grant_until": 0,
"created_at": 0
}
}