Skip to content

feat(notifications): add Gotify and unified notification script#349

Open
sungdark wants to merge 1 commit intoillbnm:masterfrom
sungdark:feature/notifications-stack
Open

feat(notifications): add Gotify and unified notification script#349
sungdark wants to merge 1 commit intoillbnm:masterfrom
sungdark:feature/notifications-stack

Conversation

@sungdark
Copy link
Copy Markdown

实现 Notifications Stack(通知服务栈)

服务清单

  • ntfy: binwiederhier/ntfy:v2.11.0(推送通知服务,支持 MQTT bridge)
  • Gotify: gotify/server:2.5.0(备用通知网关,支持 WebSocket)
  • Apprise: caronc/apprise:v1.1.6(多平台通知聚合)

变更内容

1. stacks/notifications/docker-compose.yml

  • 添加 Gotify 服务,配置 Traefik 反代和 SSO 中间件
  • 更新 ntfy 配置,添加 config/ntfy/server.yml 挂载
  • 添加 MQTT bridge 支持(TCP 端口 1883)

2. config/ntfy/server.yml (新增)

  • base-url 配置
  • MQTT bridge 启用
  • SQLite 持久化

3. scripts/notify.sh (新增)

统一通知脚本,支持 ntfy、Gotify 和同时发送

4. stacks/notifications/README.md (新增)

完整的服务集成文档:Alertmanager、Watchtower、Gitea、Home Assistant、Uptime Kuma

5. .env.example

  • 添加 GOTIFY_TOKEN 环境变量

6. README.md

  • scripts/ 目录添加 notify.sh 脚本说明

统一通知路由

  • Traefik 日志 → ntfy
  • Watchtower 更新 → ntfy
  • Alertmanager 告警 → ntfy + Gotify
  • Gitea 通知 → Gotify

我来认领

- Add Gotify (gotify/server:2.5.0) to notifications stack
- Add MQTT bridge support to ntfy
- Add scripts/notify.sh for unified notification routing
- Add config/ntfy/server.yml for ntfy configuration
- Add GOTIFY_TOKEN to .env.example
- Add comprehensive README for notifications integration
- Update main README with notify.sh script

Supports:
- Traefik logs → ntfy
- Watchtower updates → ntfy
- Alertmanager alerts → ntfy + Gotify
- Gitea notifications → Gotify
- Home Assistant → ntfy
- Uptime Kuma → ntfy
@sungdark
Copy link
Copy Markdown
Author

我来认领

实现摘要

已完成

  1. Gotify 服务 - 添加 gotify/server:2.5.0,支持 WebSocket 和 Token 认证
  2. ntfy MQTT Bridge - 在 config/ntfy/server.yml 中启用 MQTT 支持
  3. 统一通知脚本 - scripts/notify.sh 支持 ntfy/Gotify/同时发送
  4. 集成文档 - stacks/notifications/README.md 包含 Alertmanager、Watchtower、Gitea、Home Assistant、Uptime Kuma 配置说明
  5. 环境变量 - .env.example 添加 GOTIFY_TOKEN

验收测试

�[0;32m[INFO]�[0m Sending ntfy notification to topic: homelab-test
�[0;32m[INFO]�[0m Sending ntfy notification to topic: alerts

@achievefibromyalgia-lgtm
Copy link
Copy Markdown

Closing in favor of clean separate PRs: Database (#356) and Notifications (#357). Files are now properly separated with no overlap on root files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants