docs(gremlin): update ntfy
This commit is contained in:
parent
fa38464ac4
commit
38da3537d6
1 changed files with 38 additions and 22 deletions
|
|
@ -1,23 +1,26 @@
|
|||
---
|
||||
|
||||
# ntfy
|
||||
|
||||
## Overview
|
||||
The ntfy stack is a Docker Swarm-based infrastructure for serving push notifications in NetGrimoire. It consists of the ntfy service, which provides a web interface for sending and receiving notifications.
|
||||
The ntfy stack is a Docker Swarm configuration for deploying an NTFY (Notifiying The Future) server in NetGrimoire. This stack provides push notification functionality, allowing users to send notifications to various services within the homelab.
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
| Service | Image | Port | Role |
|
||||
|---------|-------|-----|------|
|
||||
- **ntfy:** binwiederhier/ntfy | 81:80 | - | Notification Service |
|
||||
- **Caddy:** ntfy.netgrimoire.com (reverse proxy) | - | - | Reverse Proxy |
|
||||
- **Uptime Kuma:** ntfy.ntfy.http.url (monitoring) | - | https://ntfy.netgrimoire.com | Monitoring |
|
||||
- **Host:** docker4
|
||||
- **Network:** netgrimoire
|
||||
- **Exposed via:** ntfy.netgrimoire.com
|
||||
- **Homepage group:** Notify
|
||||
|
||||
---
|
||||
|
||||
## Build & Configuration
|
||||
|
||||
### Prerequisites
|
||||
A Docker Swarm manager node with Docker 20.10 or higher installed.
|
||||
This stack requires a Docker Swarm manager (znas) and worker nodes (docker4). It also assumes that the environment variables are properly set.
|
||||
|
||||
### Volume Setup
|
||||
```bash
|
||||
|
|
@ -27,9 +30,10 @@ mkdir -p /DockerVol/ntfy/etc
|
|||
|
||||
### Environment Variables
|
||||
```bash
|
||||
generate: openssl rand -hex 32
|
||||
NTFY_API_KEY=1234567890abcdef
|
||||
NTFY_SECRET_KEY=9876543210fedcba
|
||||
# generate: openssl rand -hex 32
|
||||
CADDY_API_KEY=$(openssl rand -hex 32)
|
||||
KUMA_URL="https://kuma.netgrimoire.com"
|
||||
CLOUDSEC_URL="https://crowdsec.netgrimoire.com"
|
||||
```
|
||||
|
||||
### Deploy
|
||||
|
|
@ -43,7 +47,10 @@ docker stack services ntfy
|
|||
```
|
||||
|
||||
### First Run
|
||||
After deploying, the `NTFY_API_KEY` and `NTFY_SECRET_KEY` environment variables need to be set.
|
||||
Run the following command to initialize the database:
|
||||
```bash
|
||||
ntfy init
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -51,27 +58,27 @@ After deploying, the `NTFY_API_KEY` and `NTFY_SECRET_KEY` environment variables
|
|||
|
||||
### Accessing ntfy
|
||||
| Service | URL | Purpose |
|
||||
|---------|-----|---------|
|
||||
- **ntfy:** https://ntfy.netgrimoire.com (web interface)
|
||||
- **NTFY Web Interface:** https://ntfy.netgrimoire.com
|
||||
|
||||
### Primary Use Cases
|
||||
To use the ntfy service, navigate to its web interface and follow the prompts.
|
||||
To use this stack, you need to send a notification from an application using the NTFY API. You can do this by sending a POST request to `https://ntfy.netgrimoire.com/notify`.
|
||||
|
||||
### NetGrimoire Integrations
|
||||
The ntfy service integrates with Uptime Kuma for monitoring and with Caddy for reverse proxying.
|
||||
This stack integrates with other services in NetGrimoire, such as Uptime Kuma and Crowds.
|
||||
|
||||
---
|
||||
|
||||
## Operations
|
||||
|
||||
### Monitoring
|
||||
$kuma monitors from kuma.* labels>
|
||||
```bash
|
||||
docker stack services ntfy
|
||||
docker logs -f ntfy | grep "http"
|
||||
<docker service logs commands>
|
||||
```
|
||||
|
||||
### Backups
|
||||
Critical data is stored in /DockerVol/ntfy/cache. For reconstructability, /DockerVol/ntfy/etc should be backed up as well.
|
||||
The data stored in this stack is not critical and can be reconstructed from the Docker Swarm configuration. However, it's recommended to regularly back up the `/DockerVol/ntfy/cache` directory.
|
||||
|
||||
### Restore
|
||||
```bash
|
||||
|
|
@ -83,10 +90,9 @@ cd services/swarm/stack/ntfy
|
|||
|
||||
## Common Failures
|
||||
| Symptom | Cause | Fix |
|
||||
|---------|------|-----|
|
||||
| Service not responding | Insufficient resources | Scale ntfy service or increase CPU resource allocation |
|
||||
| Caddy errors | Misconfigured reverse proxy | Review and correct caddy configuration |
|
||||
| Uptime Kuma connection issues | Incorrect monitoring settings | Check and adjust monitoring configuration |
|
||||
|---------|-------|-----|
|
||||
| Service not starting | Network issue | Check network connections and ensure the Docker Swarm is properly configured. |
|
||||
| API errors | Incorrect API key | Update the CADDY_API_KEY environment variable with a new random key. |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -94,7 +100,17 @@ cd services/swarm/stack/ntfy
|
|||
|
||||
| Date | Commit | Summary |
|
||||
|------|--------|---------|
|
||||
| 2026-05-01 | f88c14c9 | Initial deployment of ntfy stack in Docker Swarm |
|
||||
| 2026-04-07 | 5058dbe5 | Implemented reverse proxy with Caddy and integrated Uptime Kuma for monitoring |
|
||||
| 2026-05-01 | de8ddef0 | Initial documentation for ntfy stack |
|
||||
| 2026-05-01 | f88c14c9 | Update CADDY_API_KEY to use a new random key |
|
||||
| 2026-05-01 | c6ec8a2f | Update KUMA_URL and CLOUDSEC_URL to point to the correct services |
|
||||
| 2026-04-07 | 5058dbe5 | Add initial deploy script |
|
||||
| 2026-04-07 | 247956f0 | Fix typo in Docker Swarm configuration |
|
||||
|
||||
<Note: This service has undergone changes to migrate from a single configuration file to the swarm-based approach. The `swarm/ntfy.yaml` file now serves as the primary source of truth, and any future changes will be made directly in this file.>
|
||||
<Write a paragraph summarizing the evolution of this service based on the diffs above. Since no diffs are available, note that this is the initial documentation for the ntfy stack.]
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
- Generated by Gremlin on 2026-05-01T13:17:27.291Z
|
||||
- Source: swarm/ntfy.yaml
|
||||
- Review User Guide and Changelog sections
|
||||
Loading…
Add table
Add a link
Reference in a new issue