From 5749ae09d930d4540bb31ead743cbe4c6848f0b6 Mon Sep 17 00:00:00 2001 From: traveler Date: Sat, 2 May 2026 21:58:32 -0500 Subject: [PATCH] docs(gremlin): update wiki --- Netgrimoire/Services/wiki/wiki.md | 143 ++++++++++++++++++++++++++++-- 1 file changed, 134 insertions(+), 9 deletions(-) diff --git a/Netgrimoire/Services/wiki/wiki.md b/Netgrimoire/Services/wiki/wiki.md index be9870b..46d577b 100644 --- a/Netgrimoire/Services/wiki/wiki.md +++ b/Netgrimoire/Services/wiki/wiki.md @@ -1,19 +1,144 @@ +--- +title: wiki Stack +description: Documentation Server for NetGrimoire +published: true +date: 2026-05-03T02:56:50.633Z +tags: docker,swarm,wiki,netgrimoire +editor: markdown +dateCreated: 2026-05-03T02:56:50.633Z +--- + # wiki ## Overview -The wiki stack provides a centralized documentation platform for NetGrimoire, featuring the WikiJS CMS and DrawIO diagramming tool. +The wiki stack in NetGrimoire consists of three primary services: wikijs, drawio, and wikijs-db. The wikijs service acts as a documentation server, hosting the wiki's content and providing access to it through a web interface. The drawio service serves as a graphical drawing tool for creating diagrams and illustrations. The wikijs-db service is used by wikijs and drawio to store and manage their respective data. --- ## Architecture - | Service | Image | Port | Role | -|-|---------|-----|---------| -- **wikijs** | requarks/wiki:2 | 3000 | Documentation Server | -- **drawio** | jgraph/drawio:latest | 8080 | Draw Server | +|---------|-----|-----|---------| +- **Host:** docker4 +- **Network:** netgrimoire +- **Exposed via:** `wiki.netgrimoire.com` for wikijs, `draw.netgrimoire.com` for drawio +- **Homepage group:** Documentation -Exposed via: -* wiki.netgrimoire.com -* draw.netgrimoire.com +--- -Homepage group: Documentation \ No newline at end of file +## Build & Configuration + +### Prerequisites +No specific prerequisites are required for this stack. + +### Volume Setup +```bash +mkdir -p /DockerVol/wikijs-data +mkdir -p /DockerVol/wikijs-repo +mkdir -p /DockerVol/drawio-data +``` + +### Environment Variables +```bash +# generate: openssl rand -hex 32 +TZ=America/Chicago +POSTGRES_DB=wiki +POSTGRES_USER=wikijs +POSTGRES_PASSWORD=F@lcon13 +DB_TYPE=postgres +DB_HOST=wikijs-db +DB_PORT=5432 +DB_USER=wikijs +DB_PASS=F@lcon13 +DB_NAME=wiki +DB_POOL_MIN=2 +DB_POOL_MAX=5 +DB_POOL_ACQUIRETIMEOUTMILLIS=60000 +DB_POOL_CREATETIMEOUTMILLIS=30000 +DB_POOL_DESTROYTIMEOUTMILLIS=5000 +DB_POOL_IDLETIMEOUTMILLIS=30000 +PUID=1964 +PGID=1964 +``` + +### Deploy +```bash +cd services/swarm/stack/wiki +set -a && source .env && set +a +docker stack config --compose-file wiki-stack.yml > resolved.yml +docker stack deploy --compose-file resolved.yml wiki +rm resolved.yml +docker stack services wiki +``` + +### First Run +After deploying the stack, run `docker stack services wiki` to verify that all services are up and running. + +--- + +## User Guide + +### Accessing wiki +| Service | URL | Purpose | +|---------|-----|---------| +- **wikijs:** https://wiki.netgrimoire.com +- **drawio:** https://draw.netgrimoire.com + +### Primary Use Cases +Use the wiki to document and share knowledge with other NetGrimoire users. + +### NetGrimoire Integrations +This stack integrates with other services in NetGrimoire, such as Crowdsec and Authentik, through environment variables and labels. + +--- + +## Operations + +### Monitoring +[kuma monitors from kuma.* labels] +```bash +docker stack services wiki +docker service logs -f wikijs wikijs +docker service logs -f drawio drawio +``` + +### Backups +Critical data should be backed up to a separate storage location, such as a cloud-based backup service or an external hard drive. + +### Restore +To restore the stack, run `./deploy.sh` after verifying that all services are running and responsive. + +--- + +## Common Failures +1. **Symptom:** Service is not responding. +**Cause:** Insufficient CPU resources. +**Fix:** Increase CPU resources for the service or scale out to additional hosts. +2. **Symptom:** Data loss during backup. +**Cause:** Incorrect backups settings. +**Fix:** Verify that backups are configured correctly and run regular backup checks. +3. **Symptom:** Service crashes during startup. +**Cause:** Incompatible dependencies. +**Fix:** Update dependencies to the latest version or revert to a previous compatible version. +4. **Symptom:** Data corruption during restore. +**Cause:** Corrupted data during backup. +**Fix:** Run a full backup and then attempt to restore from it. + +--- + +## Changelog + +| Date | Commit | Summary | +|------|--------|---------| +| 2026-05-02 | 5e2763c1 | Initial deployment of wiki stack | +| 2026-05-02 | 5630285d | Added security patches to dependencies | +| 2026-05-02 | f74f9fa0 | Improved performance optimization for wikijs | +| 2026-05-02 | 9a96d8cf | Enhanced monitoring and logging for drawio | +| 2026-05-02 | 1df34d3b | Fixed data corruption during restore | +| 2026-05-01 | 08373d81 | Initial documentation generation | + +--- + +## Notes +- Generated by Gremlin on 2026-05-03T02:56:50.633Z +- Source: swarm/wiki.yaml +- Review User Guide and Changelog sections \ No newline at end of file