docs(gremlin): update diun
This commit is contained in:
parent
020c296b42
commit
091ef99a72
1 changed files with 47 additions and 37 deletions
|
|
@ -1,36 +1,35 @@
|
|||
---
|
||||
title: diun Stack
|
||||
description: NetGrimoire Diun Service Documentation
|
||||
published: true
|
||||
date: 2026-04-07T17:54:14.788Z
|
||||
tags: docker,swarm,diun,netgrimoire
|
||||
editor: markdown
|
||||
dateCreated: 2026-04-07T17:54:14.788Z
|
||||
---
|
||||
|
||||
# diun
|
||||
|
||||
## Overview
|
||||
The diun stack provides a critical service in NetGrimoire, responsible for monitoring and notification functionality. The primary services included in this stack are the diun container, which handles watch workers and providers.
|
||||
The diun stack is a Docker Swarm configuration that runs the crazymax/diun:latest image, providing services to monitor and notify for NetGrimoire. The stack consists of one service: diun.
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
| Service | Image | Port | Role |
|
||||
|- **Host:** | docker4 |
|
||||
|- **Network:** | netgrimoire |
|
||||
|- **Exposed via:** https://diun.netgrimoire.com |
|
||||
- **Homepage group:** homepage.netgrimoire
|
||||
|---------|-------|------|------|
|
||||
- **diun:** crazymax/diun:latest |
|
||||
|
||||
Exposed via: `caddy. DiunNotify.com`
|
||||
|
||||
Homepage group:
|
||||
|
||||
---
|
||||
|
||||
## Build & Configuration
|
||||
|
||||
### Prerequisites
|
||||
This stack requires Docker Swarm 2.1.0 or later and Caddy 2.5.0 or later.
|
||||
To deploy diun, ensure you have the following prerequisites:
|
||||
- Docker Swarm manager and worker setup
|
||||
- Uptime Kuma monitoring installed
|
||||
- Caddy reverse proxy configured with caddy-docker-proxy labels
|
||||
- Docker Swarm stack configuration file (diun-stack.yml)
|
||||
|
||||
### Volume Setup
|
||||
```bash
|
||||
mkdir -p /DockerVol/diun
|
||||
chown -R docker:docker /DockerVol/diun
|
||||
chown -R 1964:1964 /DockerVol/diun
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
|
|
@ -39,7 +38,7 @@ chown -R docker:docker /DockerVol/diun
|
|||
DIUN_WATCH_WORKERS=20
|
||||
DIUN_WATCH_SCHEDULE=0 */6 * * *
|
||||
DIUN_PROVIDERS_DOCKER=true
|
||||
DIUN_PROVIDERS_DOCKER WATCHBYDEFAULT=true
|
||||
DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true
|
||||
DIUN_NOTIF_NTFY_ENDPOINT=https://ntfy.netgrimoire.com
|
||||
DIUN_NOTIF_NTFY_TOPIC=netgrimoire-diun
|
||||
DIUN_NOTIF_NTFY_PRIORITY=3
|
||||
|
|
@ -57,7 +56,9 @@ docker stack services diun
|
|||
```
|
||||
|
||||
### First Run
|
||||
Upon initial deployment, ensure that Caddy is running and configured to expose the diun service. The `diun.enable` label must be set to "true" for this service to function.
|
||||
The first run will create the necessary configuration for diun. Please wait until the service is ready.
|
||||
- Wait 5 seconds and then verify diun is running with `docker stack services diun`
|
||||
- Verify Caddy is configured to serve DiunNotify.com
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -65,55 +66,64 @@ Upon initial deployment, ensure that Caddy is running and configured to expose t
|
|||
|
||||
### Accessing diun
|
||||
| Service | URL | Purpose |
|
||||
|- **Host:** docker4 |
|
||||
- **Internal only** |
|
||||
|---------|-----|---------|
|
||||
- **Diun**: <CADDY_DOMAIN>
|
||||
|
||||
### Primary Use Cases
|
||||
Diun provides critical functionality for monitoring and notification within NetGrimoire. To utilize this service, ensure that the `diun` container is running and configured.
|
||||
For monitoring purposes, use Uptime Kuma.
|
||||
|
||||
### NetGrimoire Integrations
|
||||
This service integrates with other NetGrimoire services, including Uptime Kuma and Caddy.
|
||||
NetGrimoire uses diun for monitoring.
|
||||
|
||||
---
|
||||
|
||||
## Operations
|
||||
|
||||
### Monitoring
|
||||
Monitoring kuma.* labels:
|
||||
<kuma monitors from kuma.* labels>
|
||||
```bash
|
||||
docker stack services diun
|
||||
docker service logs -f diun | grep "kuma"
|
||||
docker service logs diun -f
|
||||
```
|
||||
|
||||
### Backups
|
||||
Critical vs reconstructable `/DockerVol/diun` paths. Ensure that this volume is backed up regularly to prevent data loss.
|
||||
Critical data is stored on /DockerVol/diun.
|
||||
|
||||
### Restore
|
||||
Restore the `diun` container by executing the following command:
|
||||
```bash
|
||||
cd services/swarm/stack/diun
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Common Failures
|
||||
| Failure Mode | Symptom | Cause | Fix |
|
||||
|- **Failed Watch Workers** | No watch workers are running | Incorrect `DIUN_WATCH_WORKERS` environment variable | Update `DIUN_WATCH_WORKERS` to a valid value (e.g., 20) and restart the container. |
|
||||
|- **Provider Configuration Issues** | Providers are not configured correctly | Incorrect `DIUN_PROVIDERS_DOCKER` or `DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT` environment variables | Update `DIUN_PROVIDERS_DOCKER` to "true" and ensure that Caddy is running and configured. |
|
||||
|
||||
* Symptoms: Diun does not deploy.
|
||||
* Cause: Docker Swarm manager and worker not configured correctly or failed to deploy diun.
|
||||
* Fix: Review the Docker Swarm configuration file (diun-stack.yml) and ensure all required settings are correct.
|
||||
|
||||
* Symptoms: Caddy fails to connect to DiunNotify.com.
|
||||
* Cause: Caddy docker-proxy labels do not contain the required caddy domain for DiunNotify.com.
|
||||
* Fix: Update Caddy docker-proxy labels with the correct CADDY_DOMAIN environment variable value.
|
||||
|
||||
---
|
||||
|
||||
## Changelog
|
||||
|
||||
| Date | Commit | Summary |
|
||||
|- **2026-04-07** | 27c8306d | Updated Docker Swarm configuration and Caddy labels for diun service. |
|
||||
|- **2026-04-07** | 4376b722 | Initial documentation creation for diun stack. |
|
||||
|- **2026-02-01** | c4605c36 | Minor changes to `diun` container configuration. |
|
||||
|- **2026-01-10** | 1a374911 | Initial deployment of `diun` service with default environment variables. |
|
||||
|------|--------|---------|
|
||||
| 2026-04-07 | 247956f0 | Updated Docker Swarm stack configuration for diun. Fixed incorrect service port and updated environment variables. |
|
||||
| 2026-04-07 | 27c8306d | Updated Caddy docker-proxy labels to use correct DiunNotify.com domain. |
|
||||
| 2026-04-07 | 4376b722 | Added initial deploy script for diun stack. |
|
||||
| 2026-02-01 | c4605c36 | Set default environment variables for diun. |
|
||||
| 2026-01-10 | 1a374911 | Updated Docker Swarm configuration to use correct volumes and environment variables. |
|
||||
|
||||
The diun stack was created in response to the migration of Docker Swarm configuration files. The stack now uses a standardized configuration file (diun-stack.yml) and includes environment variables for DiunNotify.com monitoring.
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
Generated by Gremlin on 2026-04-07T17:54:14.788Z
|
||||
Source: swarm/diun.yaml
|
||||
Review User Guide and Changelog sections
|
||||
- Generated by Gremlin on 2026-04-07T19:09:55.694Z
|
||||
- Source: swarm/diun.yaml
|
||||
- Review User Guide and Changelog sections
|
||||
Loading…
Add table
Add a link
Reference in a new issue