docs(gremlin): create diun

This commit is contained in:
traveler 2026-04-29 22:16:57 -05:00
parent 8cc0a49132
commit dd00c4ef6e

View file

@ -0,0 +1,107 @@
# diun
## Overview
The `diun` stack is a Docker Swarm configuration for the NetGrimoire homelab, providing a migration path to swarm-based deployment.
---
## Architecture
| Service | Image | Port | Role |
|- **Host:** docker4
- Exposed via: <https://diun.netgrimoire.com>
- Homepage group: homepage
---
## Build & Configuration
### Prerequisites
No specific prerequisites are required for this stack, but ensure that Docker Swarm and Caddy are installed and configured on the `znas` node.
### Volume Setup
```bash
mkdir -p /DockerVol/diun
chmod 755 /DockerVol/diun
```
### Environment Variables
```bash
# generate: openssl rand -hex 32
DIUN_NOTIF_NTFY_ENDPOINT: https://ntfy.netgrimoire.com
DIUN_NOTIF_NTFY_TOPIC: netgrimoire-diun
DIUN_NOTIF_NTFY_PRIORITY: "3"
```
### Deploy
```bash
cd services/swarm/stack/diun
set -a && source .env && set +a
docker stack config --compose-file diun-stack.yml > resolved.yml
docker stack deploy --compose-file resolved.yml diun
rm resolved.yml
docker stack services diun
```
### First Run
Run `./deploy.sh` to initialize the stack after deployment.
---
## User Guide
### Accessing diun
| Service | URL | Purpose |
|- **diun:** <https://diun.netgrimoire.com>
### Primary Use Cases
Diun provides a central location for monitoring and notification services, connecting to other NetGrimoire services through environment variables and labels.
### NetGrimoire Integrations
Diun integrates with the `kuma` service for monitoring and notification, as well as `homepage` for serving its primary interface.
---
## Operations
### Monitoring
```bash
docker stack services diun
<docker service logs commands>
```
### Backups
Critical data is stored in `/DockerVol/diun`. Reconstructing the data requires a full restore of the volume.
### Restore
```bash
cd services/swarm/stack/diun
./deploy.sh
```
---
## Common Failures
| Symptom | Cause | Fix |
|---------|-------|-----|
| Diun not responding | Caddy not configured correctly | Check and correct Caddy labels and configuration |
| kuma monitors failing | Missing `kuma.*` labels on services | Add missing `kuma.*` labels to services |
| Volume loss | Incorrect volume permissions or ownership | Correct volume permissions and ownership |
---
## Changelog
| Date | Commit | Summary |
|------|--------|---------|
| 2026-04-29 | a343f343 | Migrated to Docker Swarm configuration |
| 2026-04-07 | 247956f0 | Initial documentation creation |
| 2026-04-07 | 27c8306d | Updated environment variables and deploy script |
| 2026-04-07 | 4376b722 | Added support for critical data storage in `/DockerVol/diun` |
| 2026-02-01 | c4605c36 | Initial service creation |
---
## Notes
- Generated by Gremlin on 2026-04-30T03:15:53.793Z
- Source: swarm/diun.yaml
- Review User Guide and Changelog sections