chore: 加一键发布脚本 deploy.sh(编译→传ali→备份→重启→探活,失败自动回滚)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019UQmqWmV67sXGLrb3U1XXn
This commit is contained in:
2026-07-03 22:49:52 +08:00
parent fd5f56f7de
commit ef0fa39ce4
2 changed files with 36 additions and 1 deletions
+7 -1
View File
@@ -60,8 +60,14 @@ pay/
## 构建部署
**一键发布到 ali(推荐)**
```bash
./deploy.sh # 交叉编译 linux/amd64 → 传 ali → 备份 → 重启 pay → 探活(失败自动回滚)
```
手动构建:
```bash
go build -o payd . # 纯 Go,无需 gcc,可直接拷到阿里云 Linux 运行
```
生产改 `config.yaml``server.mode: release`、`base_url` 为正式 HTTPS 域名、商户 `production: true` 并换正式密钥
生产改 `config.yaml``server.mode: release`、`base_url` 为正式 HTTPS 域名、商户 `production: true`;密钥走环境变量(`/etc/pay/pay.env`Bitwarden 灌),不入库