节点 :443 被 VPN 占用 + CF 免费套餐改回源端口需 Enterprise → 官网改 CF Pages 托管 (纯静态/全程 HTTPS/CSP 生效/无 :443 冲突),已上线 pangolin.yanmeiai.com。 deploy-site.sh 用 wrangler,需 CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ pangolin 现有 CI 仅 `.gitea/workflows/ci.yml`(nas,只校验无部署)+ `web/w
|
||||
- `test.sh <server|client>` —— `go test` / `flutter test`
|
||||
- `notify.sh` —— 成功/失败 Telegram 通知(可选,复用节点监控 bot)
|
||||
- `compile-site.sh` / `compile-backend.sh` / `compile-android.sh` / `compile-macos.sh` / `compile-windows.sh`
|
||||
- `deploy-site.sh` / `deploy-server.sh`(ssh pangolin1)
|
||||
- `deploy-site.sh`(wrangler → CF Pages)/ `deploy-server.sh`(ssh pangolin1,复用 lib-ssh)
|
||||
- `release-<x>.sh` —— 建 release + 挂产物
|
||||
|
||||
> 每个 `compile-*` 内部封装该端已验证的构建命令(如 Android 走
|
||||
@@ -74,11 +74,18 @@ pangolin 现有 CI 仅 `.gitea/workflows/ci.yml`(nas,只校验无部署)+ `web/w
|
||||
5. `install` 新二进制到 `/usr/local/bin`(旧的备份为 `.bak-<tag>`)
|
||||
6. `systemctl start pangolin-server` + `/healthz` 健康检查;agent 随连接自恢复
|
||||
|
||||
### 4.4 官网部署(deploy-site.sh)
|
||||
### 4.4 官网部署(deploy-site.sh)—— Cloudflare Pages
|
||||
|
||||
Astro `npm ci && npm run build`(`SITE_URL=https://pangolin.yanmeiai.com`)→ `dist/` rsync 到
|
||||
服务器 web 根 → 由 nginx/Caddy 静态托管 `pangolin.yanmeiai.com`。**DNS**:CF 加 A/CNAME
|
||||
`pangolin.yanmeiai.com` → 服务器(首次部署时做,记 baize)。
|
||||
> **架构变更(2026-07-06 实施):** 原计划 rsync 到 pangolin1 的 nginx。但节点 :443 被 sing-box
|
||||
> (VPN 数据面)占用,而 CF 免费套餐 proxied 回源只能打 :80/:443、改回源端口需 Enterprise ——
|
||||
> 无法在同机同 IP 上让官网 HTTPS 与 VPN 共存。**故官网改由 Cloudflare Pages 托管**:纯静态、
|
||||
> 全程 HTTPS、`_headers`/CSP 原生生效、不落 VPS,从根上无 :443 冲突,也不拖累 VPN 机器。
|
||||
|
||||
Astro `npm ci && npm run build`(`SITE_URL=https://pangolin.yanmeiai.com`)→ `dist/` 经
|
||||
`npx wrangler pages deploy` 发布到 CF Pages 项目 **`pangolin-site`**(自定义域
|
||||
`pangolin.yanmeiai.com`,CNAME → `pangolin-site.pages.dev`,proxied)。
|
||||
需 secret:`CLOUDFLARE_API_TOKEN`(带 Account>Pages>Edit)+ `CLOUDFLARE_ACCOUNT_ID`(账户级)。
|
||||
deploy 步骤在 `node:20` 容器内跑 wrangler。**灾备**:构建产物仍是纯静态,可另 rsync 到任意镜像。
|
||||
|
||||
## 5. 下载链接闭环(30A)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user