docs(gremlin): update wiki

This commit is contained in:
traveler 2026-05-02 21:56:01 -05:00
parent cde3907e71
commit 66527a3d02

View file

@ -1,122 +1,19 @@
# wiki
## Overview
The wiki stack in NetGrimoire provides a documentation server with services for managing the content, user interface, and database.
The wiki stack provides a centralized documentation platform for NetGrimoire, featuring the WikiJS CMS and DrawIO diagramming tool.
---
## Architecture
| Service | Image | Port | Role |
|---------|-----|-----|---------|
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com
- **Homepage group:** Documentation
|-|---------|-----|---------|
- **wikijs** | requarks/wiki:2 | 3000 | Documentation Server |
- **drawio** | jgraph/drawio:latest | 8080 | Draw Server |
---
Exposed via:
* wiki.netgrimoire.com
* draw.netgrimoire.com
## Build & Configuration
### Prerequisites
No specific prerequisites are required for this stack.
### Volume Setup
```bash
mkdir -p /DockerVol/wikijs-data /DockerVol/wikijs-repo /DockerVol/wikijs-ssh
chown -R user:group /DockerVol/wikijs-
```
### Environment Variables
```bash
# generate: openssl rand -hex 32
POSTGRES_PASSWORD=F@lcon13
DB_PASS=F@lcon13
PUID=1964
PGID=1964
CADDY_PORT=3000
DRAWIO_PORT=8080
DB_USER=wikijs
DB_NAME=wiki
```
### 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
Run the `./deploy.sh` script after deployment.
---
## User Guide
### Accessing wiki
| Service | URL | Purpose |
|---------|-----|---------|
- **wikijs:** http://wiki.netgrimoire.com
- **drawio:** http://draw.netgrimoire.com
### Primary Use Cases
To access the documentation server, navigate to `http://wiki.netgrimoire.com`.
### NetGrimoire Integrations
This stack integrates with other services such as authentik and crowdsec.
---
## Operations
### Monitoring
[kuma monitors from kuma.* labels]
```bash
docker stack services wiki
docker service logs wiki -f
```
### Backups
Critical data stored on the /DockerVol/wikijs-data volume. Critical data is not reconstructable, but can be restored by re-running the deploy script.
### Restore
```bash
cd services/swarm/stack/wiki
./deploy.sh
```
---
## Common Failures
| Symptom | Cause | Fix |
|---------|------|-----|
| Service not responding | Network issue | Check network logs and restart service |
| Data loss | Volume failure | Use backup scripts to restore data |
| Service not updating | DB connection issue | Check DB connection logs and restart service |
---
## Changelog
| Date | Commit | Summary |
|------|--------|---------|
| 2026-05-02 | f74f9fa0 | Initial documentation for wiki stack |
| 2026-05-02 | 9a96d8cf | Added environment variables and volume setup script |
| 2026-05-02 | 1df34d3b | Improved deploy script for first run |
| 2026-05-02 | dc45fd7b | Updated monitoring scripts for wiki services |
| 2026-05-02 | ebb2d582 | Added backup and restore procedures |
| 2026-05-02 | 7acd015c | Fixed Common Failures section to better match symptoms |
| 2026-05-01 | 08373d81 | Minor formatting changes |
| 2026-05-01 | 8502d4ea | Improved User Guide section on Accessing wiki |
| 2026-05-01 | dae11c17 | Minor formatting changes |
| 2026-05-01 | 94ce222e | Added note about generated documentation |
---
## Notes
- Generated by Gremlin on 2026-05-03T02:53:50.325Z
- Source: swarm/wiki.yaml
- Review User Guide and Changelog sections
Homepage group: Documentation