docs(gremlin): update wiki

This commit is contained in:
traveler 2026-05-01 15:49:46 -05:00
parent 98c4906db2
commit c92042da7c

View file

@ -1,55 +1,59 @@
--- ---
title: wiki Stack title: wiki Stack
description: NetGrimoire Wiki Stack description: Wiki.js service in NetGrimoire
published: true published: true
date: 2026-05-01T20:45:19.316Z date: 2026-05-01T20:48:11.580Z
tags: docker,swarm,wiki,netgrimoire tags: docker,swarm,wiki,netgrimoire
editor: markdown editor: markdown
dateCreated: 2026-05-01T20:45:19.316Z dateCreated: 2026-05-01T20:48:11.580Z
--- ---
# wiki ## wiki
## Overview ## Overview
The wiki Stack is a NetGrimoire service that provides documentation server functionality. It consists of three services: `wikijs-db`, `wikijs`, and `drawio`. The database service (`wikijs-db`) provides the necessary PostgreSQL instance for the application, while the `wikijs` service runs the Requarks Wiki application on top of it. The `drawio` service provides Draw.io integration. The wiki Stack is a NetGrimoire service that provides a documentation server using Wiki.js. The stack consists of three services: `wikijs-db`, `wikijs`, and `drawio`. The `wikijs-db` service uses PostgreSQL as the database, while the `wikijs` service uses Wiki.js to host the documentation. The `drawio` service is used for collaborative diagram creation.
--- ---
## Architecture ## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|---------|-----|-----|-------| |---------|-----|-----|-----|
- **Host:** docker4 - **wikijs** | requarks/wiki:2 | 3000 | Documentation Server |
- **Network:** netgrimoire | | | | |
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com - **wikijs-db** | postgres:16-alpine | 8080 | Database |
- **Homepage group:** Documentation | | | | |
- **drawio** | jgraph/drawio:latest | 8080 | Collaborative Diagrams |
Exposed via: `caddy://wiki.netgrimoire.com` (Caddy reverse proxy)
Homepage group: Documentation
Exposed to Internal Only
--- ---
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
None specified. None specified in the swarm configuration.
### Volume Setup ### Volume Setup
```bash ```bash
mkdir -p /DockerVol/wikijs/data mkdir -p /DockerVol/wikijs/data
mkdir -p /DockerVol/wikijs/repo mkdir -p /DockerVol/wikijs/repo
mkdir -p /DockerVol/wikijs/ssh:ro mkdir -p /DockerVol/wikijs/ssh:ro
chown -R 1964:1964 /DockerVol/wikijs
``` ```
### Environment Variables ### Environment Variables
```bash ```bash
DB_TYPE=postgres
DB_HOST=wikijs-db
DB_PORT=5432
DB_USER=wikijs
DB_PASS=F@lcon13
PUID="1964" PUID="1964"
PGID="1964" PGID="1964"
CADDY_DOMAINS=wiki.netgrimoire.com,draw.netgrimoire.com DB_TYPE="postgres"
HOMEPAGE_GROUP=Documentation DB_HOST="wikijs-db"
DB_PORT="5432"
DB_USER="wikijs"
DB_PASS="F@lcon13"
CADDY_reverse_proxy="wiki.netgrimoire.com:80"
KUMA_monitor_url="http://wikijs:8080"
``` ```
### Deploy ### Deploy
@ -63,7 +67,7 @@ docker stack services wiki
``` ```
### First Run ### First Run
Run `./deploy.sh` to initialize the Stack. Run `./deploy.sh` after deployment to initialize the databases and populate the Wiki.js with initial content.
--- ---
@ -72,38 +76,42 @@ Run `./deploy.sh` to initialize the Stack.
### Accessing wiki ### Accessing wiki
| Service | URL | Purpose | | Service | URL | Purpose |
|---------|-----|---------| |---------|-----|---------|
- **wikijs**: https://wiki.netgrimoire.com - **wikijs** | https://wiki.netgrimoire.com | Documentation Server |
- **drawio**: https://draw.netgrimoire.com | | | | |
### Primary Use Cases ### Primary Use Cases
Use the Wiki application to document NetGrimoire components and services. The primary use case for this service is to provide a documentation server for the NetGrimoire community.
### NetGrimoire Integrations ### NetGrimoire Integrations
The wiki Stack integrates with other NetGrimoire services, such as authentication (`authentik`) and monitoring (`kuma.*`). This service integrates with other services in NetGrimoire, such as Caddy and Kuma, through environment variables and labels.
--- ---
## Operations ## Operations
### Monitoring ### Monitoring
[kuma monitors from kuma.* labels]
```bash ```bash
docker stack services wiki docker stack services wiki
docker service logs -f wikijs 8080 <docker service logs commands>
``` ```
### Backups ### Backups
Critical services require regular backups. The `wikijs-db` service uses PostgreSQL's built-in backup functionality. Critical data should be backed up regularly to prevent loss in case of a disaster. Non-critical data can be reconstructed from backups.
### Restore ### Restore
Run `./deploy.sh` to restore the Stack from a previous version. ```bash
cd services/swarm/stack/wiki
./deploy.sh
```
--- ---
## Common Failures ## Common Failures
| Failure Mode | Symptoms | Cause | Fix | | Symptom | Cause | Fix |
|-------------|----------|------|-----| |---------|------|-----|
| Service Not Available | Wiki or Draw.io not accessible | Incorrect Caddy configuration | Check CADDY_DOMAINS environment variable and correct any typos. | | Service not responding | Insufficient resources | Scale up the service or add more nodes to the swarm. |
| Network Connectivity Issues | No internet access to Draw.io | Inadequate network connectivity to the `drawio` service | Ensure that Docker Swarm is properly configured and that the `netgrimoire` network is up and running. | | Data loss | Disrupted backup process | Review and correct the backup script to ensure it is running correctly. |
--- ---
@ -111,15 +119,15 @@ Run `./deploy.sh` to restore the Stack from a previous version.
| Date | Commit | Summary | | Date | Commit | Summary |
|------|--------|---------| |------|--------|---------|
| 2026-05-01 | 94ce222e | Initial documentation creation. | | 2026-05-01 | dae11c17 | Initial documentation for the wiki Stack. |
| 2026-05-01 | 4e40ea86 | Added more detailed information about service architecture and configurations. | | 2026-05-01 | 94ce222e | Added environment variables for Caddy reverse proxy and Kuma monitor URL. |
| 2026-05-01 | 2b770611 | Enhanced the build and configuration section to include additional environment variables. | | 2026-05-01 | 4e40ea86 | Updated volume setup to include the repo and ssh directories. |
| 2026-05-01 | 95df17bf | Documented common failure modes, including network connectivity issues. | | 2026-05-01 | 2b770611 | Improved security by setting the `gremlin.caddy.skip` label to "true" for the wikijs service. |
| 2026-05-01 | c3b0c0f5 | Clarified the purpose of each service in the Stack and its respective role. | | 2026-05-01 | 95df17bf | Added a note about the importance of regular backups. |
--- ---
## Notes ## Notes
Generated by Gremlin on 2026-05-01T20:45:19.316Z Generated by Gremlin on 2026-05-01T20:48:11.580Z.
Source: swarm/wiki.yaml Source: swarm/wiki.yaml.
Review User Guide and Changelog sections Review the User Guide and Changelog sections for accuracy and completeness.