webhook-tools/README.md
2024-08-29 13:45:02 +08:00

36 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

*使用[webhook](https://github.com/soulteary/webhook.git)项目*
*config目录为webhook配置*
*scripts存放执行脚本*
*重要提示*
已安装docker及docker-compose
## 启动
```shell
docker compose up -d
```
## 停止
```shell
docker compose down
```
## 配置说明
#### suno_recharge
举例如下:
* suno生产环境的account_1用户充值500 credit
```shell
curl "http://127.0.0.1:8002/hooks/suno_recharge?env=prod&&account=account_1&&amount=500"
```
#### huaweicloud
需要事先配置好smn主题配置订阅时选择http/https把webhook地址填入如本例中的https://webhook-ops.shasoapp.com/hooks/huaweicloud
有消息通知时会把消息中的message字段发送到飞书群中
#### hwtlsupdate
需要事先配置acme.sh生成域名证书然后后配置到华为云-网络控制台-弹性负载均衡-证书管理中并获取证书id
acme.sh自动更新证书时会请求相应webhook地址更新华为云中配置的证书。
#### notify
jenkins通知飞书群如果有大量文本信息需要把文本base64编码存放到json文件中如果有需要展示或保存的文本信息使用参数--file默认存放在cloudflare的r2中会自动生成下载链接在飞书中展示。
需要配置r2的access_key和secret_key及公有域名