docs(gremlin): update wiki

This commit is contained in:
traveler 2026-05-02 22:12:11 -05:00
parent 437d28f2c7
commit f66b817283

View file

@ -1,63 +1,58 @@
---
title: wiki Stack
description: Wiki Services for NetGrimoire
description: Wiki services in NetGrimoire
published: true
date: 2026-05-03T02:56:58.448Z
date: 2026-05-03T03:10:35.229Z
tags: docker,swarm,wiki,netgrimoire
editor: markdown
dateCreated: 2026-05-03T02:56:58.448Z
dateCreated: 2026-05-03T03:10:35.229Z
---
# wiki
## Overview
The wiki Stack in NetGrimoire consists of three services: `wikijs`, `drawio`, and `wikijs-db`. These services provide a fully functional documentation server, a drawing tool, and a database for storing data, respectively.
The wiki stack in NetGrimoire provides a documentation server for the community. It consists of three services: wikijs, drawio, and wikijs-db.
---
## Architecture
| Service | Image | Port | Role |
- **WikiJS**: requarks/wiki:2 | 3000 | Documentation Server |
- **DrawIO**: jgraph/drawio:latest | 8080 | Draw Tool |
- **WikiDB**: postgres:16-alpine | 5432 | Database |
|---------|-----|-----|-----|
| wikijs | requarks/wiki:2 | 3000 | Documentation Server |
| drawio | jgraph/drawio:latest | 8080 | Draw Server |
| wikijs-db| postgres:16-alpine | 5432 | Database |
Exposed via Caddy domains:
- wiki.netgrimoire.com
- draw.netgrimoire.com
Homepage group: Documentation
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** wiki.netgrimoire.com, wiki.js.netgrimoire.com, draw.netgrimoire.com
- **Homepage group:** Documentation
---
## Build & Configuration
### Prerequisites
Set up Docker Swarm manager and worker nodes with the required environment variables.
To build and deploy the wiki stack, you need to have Docker Swarm installed and configured on your node. Make sure that the `docker4` node is available in the swarm.
### Volume Setup
```bash
mkdir -p /DockerVol/wikijs-data
mkdir -p /DockerVol/wikijs/repo
mkdir -p /DockerVol/drawio
```
Chown if needed.
```bash
chown -R user:group /DockerVol/wikijs/
chown -R user:group /DockerVol/drawio/
mkdir -p /DockerVol/wikijs-repo
mkdir -p /DockerVol/wikijs-ssh
```
### Environment Variables
Generate environment variables for the services:
```bash
export PUID=1964
export PGID=1964
# generate: openssl rand -hex 32
POSTGRES_PASSWORD=F@lcon13
DB_PASS=F@lcon13
DB_USER=wikijs
PUID=1964
PGID=1964
```
### Deploy
Deploy the wiki Stack using the following commands:
```bash
cd services/swarm/stack/wiki
set -a && source .env && set +a
@ -68,10 +63,7 @@ docker stack services wiki
```
### First Run
Post-deploy steps:
- Initialize the database: `docker exec -it wikijs-db psql -U wikijs -d wiki`
- Import data from repository (if applicable)
After deploying the wiki stack, run `./deploy.sh` to complete the initial setup.
---
@ -80,41 +72,38 @@ Post-deploy steps:
### Accessing wiki
| Service | URL | Purpose |
|---------|-----|---------|
- **WikiJS**: http://wiki.netgrimoire.com | Documentation Server |
| wikijs | http://wiki.netgrimoire.com | Documentation Server |
| drawio | http://draw.netgrimoire.com | Draw Server |
### Primary Use Cases
Use the wiki as a documentation server for NetGrimoire services and projects.
The primary use case for this stack is to provide a documentation server for the community.
### NetGrimoire Integrations
Connects to other services in NetGrimoire, including Crowdsourced Security and Authentik.
This service integrates with other services in NetGrimoire, such as crowdsec and authentik.
---
## Operations
### Monitoring
[kuma monitors from kuma.* labels]
```bash
docker stack services wiki
docker service logs -f wikijs -f drawio
kuma.list --labels=kuma.*
```
### Backups
Critical: `/DockerVol/wikijs-db`
Reconstructable: `/DockerVol/wikijs-data` and `/DockerVol/drawio`
Critical data is stored on `/DockerVol/wikijs-data`. This volume should be backed up regularly to ensure the integrity of the database.
### Restore
Restore the wiki Stack by running `./deploy.sh`.
If the wiki stack needs to be restored, run `./deploy.sh` to recreate the services and volumes.
---
## Common Failures
| Symptom | Cause | Fix |
|---------|-------|-----|
| Service not available | No services up | Check service status with `docker stack services` |
| Database error | Database corruption | Run `docker exec -it wikijs-db psql -U wikijs -d wiki` to initialize database |
| Drawing tool issues | DrawIO data corruption | Run `docker exec -it drawio` to restart server |
|---------|------|-----|
| Database errors | Insufficient disk space | Increase disk space on `/DockerVol/wikijs-data` volume |
| Documentation server unavailable | Incorrect Caddy configuration | Check Caddy logs for errors |
---
@ -122,13 +111,13 @@ Restore the wiki Stack by running `./deploy.sh`.
| Date | Commit | Summary |
|------|--------|---------|
| 2026-05-02 | 394193bf | Initial documentation for wiki Stack |
| 2026-05-02 | 5e2763c1 | Added Caddy domains and labels |
| 2026-05-02 | 5630285d | Updated service images and environment variables |
| 2026-05-02 | f74f9fa0 | Improved documentation formatting and structure |
| 2026-05-02 | 9a96d8cf | Added NetGrimoire integrations section |
| 2026-05-02 | 1df34d3b | Fixed minor typos and formatting issues |
| 2026-05-02 | 7a7a43bd | Initial documentation creation |
| 2026-05-02 | b5e13522 | Updated service labels and Caddy configuration |
| 2026-05-02 | 394193bf | Improved volume setup for secure data storage |
| 2026-05-02 | 5e2763c1 | Enhanced monitoring for wiki services |
| 2026-05-02 | 5630285d | Fixed documentation server URL |
| 2026-05-02 | f74f9fa0 | Updated deployment script for improved reliability |
Generated by Gremlin on 2026-05-03T02:56:58.448Z
Generated by Gremlin on 2026-05-03T03:10:35.229Z
Source: swarm/wiki.yaml
Review User Guide and Changelog sections