feat: organize scripts and add portal validation assets
This commit is contained in:
25
deploy/README.md
Normal file
25
deploy/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# deploy 目录说明
|
||||
|
||||
日期:2026-05-27
|
||||
|
||||
`deploy/` 用来存放**部署目标会直接消费**的静态资产或配置模板。
|
||||
|
||||
当前内容:
|
||||
|
||||
- `tksea-portal/index.html`
|
||||
- `https://sub.tksea.top/portal/` 的静态页面源码
|
||||
- `tksea-portal/nginx.sub.tksea.top.conf.example`
|
||||
- `sub.tksea.top` 上 portal 路由与代理示例
|
||||
|
||||
它和 `scripts/` 的边界如下:
|
||||
|
||||
- `deploy/`
|
||||
- 放静态页、Nginx/Caddy/Env 模板、会被复制到目标机上的文件
|
||||
- `scripts/`
|
||||
- 放执行复制、部署、reload、验收的脚本
|
||||
|
||||
当前对应关系:
|
||||
|
||||
- 资产:`deploy/tksea-portal/*`
|
||||
- 部署脚本:`scripts/deploy/deploy_tksea_portal.sh`
|
||||
- 资产回归:`scripts/test/test_tksea_portal_assets.sh`
|
||||
1298
deploy/tksea-portal/index.html
Normal file
1298
deploy/tksea-portal/index.html
Normal file
File diff suppressed because it is too large
Load Diff
63
deploy/tksea-portal/nginx.sub.tksea.top.conf.example
Normal file
63
deploy/tksea-portal/nginx.sub.tksea.top.conf.example
Normal file
@@ -0,0 +1,63 @@
|
||||
# sub.tksea.top portal routing example
|
||||
#
|
||||
# 说明:
|
||||
# - /portal/ 是新的通用多模型接入中心地址
|
||||
# - /kimi-portal 与 /kimi-portal/ 保留 302 跳转,避免旧链接失效
|
||||
# - /portal-proxy/ 是页面调用宿主用户态 API 的同域代理
|
||||
# - /kimi/ 与 /kimi-v1/ 继续保留,兼容旧的 Kimi 专用客户端配置
|
||||
|
||||
location = /portal {
|
||||
return 302 /portal/;
|
||||
}
|
||||
|
||||
location = /kimi-portal {
|
||||
return 302 /portal/;
|
||||
}
|
||||
|
||||
# BEGIN sub2api-portal
|
||||
location /portal/ {
|
||||
alias /var/www/sub2api-portal/;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /portal/index.html;
|
||||
}
|
||||
|
||||
location /portal-proxy/ {
|
||||
proxy_pass http://127.0.0.1:18169/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
|
||||
location /kimi-portal/ {
|
||||
return 302 /portal/;
|
||||
}
|
||||
|
||||
location /kimi-portal-proxy/ {
|
||||
proxy_pass http://127.0.0.1:18169/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
|
||||
location /kimi/ {
|
||||
proxy_pass http://127.0.0.1:18169/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
|
||||
location /kimi-v1/ {
|
||||
proxy_pass http://127.0.0.1:18169/v1/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
# END sub2api-portal
|
||||
Reference in New Issue
Block a user