mirror of
https://github.com/KingHWJ/WeReadBoard.git
synced 2026-11-03 18:24:58 +08:00
merge: 补充 Webhook 健康检查配置
This commit is contained in:
commit
646d75c318
3 files changed
+7
-2
No files matched your search
@@ -5,3 +5,8 @@ location = /github/webhook {
|
|||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location = /github/webhook-health {
|
||||||
|
proxy_pass http://127.0.0.1:9001/health;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
@@ -84,6 +84,6 @@ WantedBy=multi-user.target
|
|||||||
|
|
||||||
## Nginx HTTPS 转发
|
## Nginx HTTPS 转发
|
||||||
|
|
||||||
将 `deploy/nginx-github-webhook.conf` 的 `location` 放入 `laohang.space` 的 HTTPS server 块,然后执行 `sudo nginx -t && sudo systemctl reload nginx`。Webhook 服务只监听 `127.0.0.1:9001`,不要对公网开放 9001 端口。
|
将 `deploy/nginx-github-webhook.conf` 的两个 `location` 放入 `laohang.space` 的 HTTPS server 块,然后执行 `sudo nginx -t && sudo systemctl reload nginx`。Webhook 服务只监听 `127.0.0.1:9001`,不要对公网开放 9001 端口。健康检查地址为 `https://laohang.space/github/webhook-health`。
|
||||||
|
|
||||||
`.github/workflows/deploy.yml` 只执行 Python、前端和部署脚本检查。Webhook 模式不再需要 `SERVER_HOST`、`SERVER_PORT`、`SERVER_USER`、`SERVER_SSH_KEY` 这些 Actions Secrets。
|
`.github/workflows/deploy.yml` 只执行 Python、前端和部署脚本检查。Webhook 模式不再需要 `SERVER_HOST`、`SERVER_PORT`、`SERVER_USER`、`SERVER_SSH_KEY` 这些 Actions Secrets。
|
||||||
@@ -81,7 +81,7 @@ Webhook 排查命令:
|
|||||||
sudo systemctl status weread-webhook.service --no-pager
|
sudo systemctl status weread-webhook.service --no-pager
|
||||||
sudo journalctl -u weread-webhook.service -n 100 --no-pager
|
sudo journalctl -u weread-webhook.service -n 100 --no-pager
|
||||||
sudo nginx -t
|
sudo nginx -t
|
||||||
curl -fsS https://laohang.space/health
|
curl -fsS https://laohang.space/github/webhook-health
|
||||||
```
|
```
|
||||||
|
|
||||||
GitHub 显示签名错误时,确认 Webhook Secret 与 `/etc/weread-webhook.env` 完全一致;显示 202 但没有部署时,确认仓库全名、`refs/heads/master` 和部署锁状态。不要通过请求体传入 Shell 命令。
|
GitHub 显示签名错误时,确认 Webhook Secret 与 `/etc/weread-webhook.env` 完全一致;显示 202 但没有部署时,确认仓库全名、`refs/heads/master` 和部署锁状态。不要通过请求体传入 Shell 命令。
|
||||||
|
|||||||
Reference in new issue
Block a user