docs(gremlin): create ntfy
This commit is contained in:
parent
5f3aa7d22b
commit
fa38464ac4
1 changed files with 100 additions and 0 deletions
100
Netgrimoire/Services/ntfy/ntfy.md
Normal file
100
Netgrimoire/Services/ntfy/ntfy.md
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 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 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Build & Configuration
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
A Docker Swarm manager node with Docker 20.10 or higher installed.
|
||||||
|
|
||||||
|
### Volume Setup
|
||||||
|
```bash
|
||||||
|
mkdir -p /DockerVol/ntfy/cache
|
||||||
|
mkdir -p /DockerVol/ntfy/etc
|
||||||
|
```
|
||||||
|
|
||||||
|
### Environment Variables
|
||||||
|
```bash
|
||||||
|
generate: openssl rand -hex 32
|
||||||
|
NTFY_API_KEY=1234567890abcdef
|
||||||
|
NTFY_SECRET_KEY=9876543210fedcba
|
||||||
|
```
|
||||||
|
|
||||||
|
### Deploy
|
||||||
|
```bash
|
||||||
|
cd services/swarm/stack/ntfy
|
||||||
|
set -a && source .env && set +a
|
||||||
|
docker stack config --compose-file ntfy-stack.yml > resolved.yml
|
||||||
|
docker stack deploy --compose-file resolved.yml ntfy
|
||||||
|
rm resolved.yml
|
||||||
|
docker stack services ntfy
|
||||||
|
```
|
||||||
|
|
||||||
|
### First Run
|
||||||
|
After deploying, the `NTFY_API_KEY` and `NTFY_SECRET_KEY` environment variables need to be set.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## User Guide
|
||||||
|
|
||||||
|
### Accessing ntfy
|
||||||
|
| Service | URL | Purpose |
|
||||||
|
|---------|-----|---------|
|
||||||
|
- **ntfy:** https://ntfy.netgrimoire.com (web interface)
|
||||||
|
|
||||||
|
### Primary Use Cases
|
||||||
|
To use the ntfy service, navigate to its web interface and follow the prompts.
|
||||||
|
|
||||||
|
### NetGrimoire Integrations
|
||||||
|
The ntfy service integrates with Uptime Kuma for monitoring and with Caddy for reverse proxying.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Operations
|
||||||
|
|
||||||
|
### Monitoring
|
||||||
|
```bash
|
||||||
|
docker stack services ntfy
|
||||||
|
docker logs -f ntfy | grep "http"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Backups
|
||||||
|
Critical data is stored in /DockerVol/ntfy/cache. For reconstructability, /DockerVol/ntfy/etc should be backed up as well.
|
||||||
|
|
||||||
|
### Restore
|
||||||
|
```bash
|
||||||
|
cd services/swarm/stack/ntfy
|
||||||
|
./deploy.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 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 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
| 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 |
|
||||||
|
|
||||||
|
<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.>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue