diff --git a/.gitignore b/.gitignore index ed84900..56609dd 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/deploy/data-seed/domains.json b/deploy/data-seed/domains.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/deploy/data-seed/domains.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/deploy/data-seed/llm-upstreams.json.example b/deploy/data-seed/llm-upstreams.json.example new file mode 100644 index 0000000..6297262 --- /dev/null +++ b/deploy/data-seed/llm-upstreams.json.example @@ -0,0 +1,7 @@ +{ + "deepseek": { + "base": "https://api.deepseek.com/v1", + "auth": "Bearer <上游厂商真实 API Key,部署时填写,网关会原样转发到上游>", + "enabled": true + } +} diff --git a/deploy/data-seed/users.json.example b/deploy/data-seed/users.json.example new file mode 100644 index 0000000..32695b7 --- /dev/null +++ b/deploy/data-seed/users.json.example @@ -0,0 +1,14 @@ +{ + "admin": { + "username": "admin", + "role": "admin", + "salt": "<随机32位hex,部署时用 openssl rand -hex 16 生成>", + "pwd_hash": "", + "api_key": "", + "allowed_models": [], + "llm_rpm": 60, + "llm_daily": 0, + "temp_grant_until": 0, + "created_at": 0 + } +}