docs(gremlin): update wiki

This commit is contained in:
traveler 2026-05-01 15:46:51 -05:00
parent 27f766621d
commit 98c4906db2

View file

@ -1,13 +1,24 @@
---
title: wiki Stack
description: NetGrimoire Wiki Stack
published: true
date: 2026-05-01T20:45:19.316Z
tags: docker,swarm,wiki,netgrimoire
editor: markdown
dateCreated: 2026-05-01T20:45:19.316Z
---
# wiki # wiki
## Overview ## Overview
This stack provides a WikiJS instance in NetGrimoire, utilizing Docker Swarm for deployment. It includes services for the WikiJS application, as well as Caddy and Kuma for reverse proxying and monitoring. 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.
--- ---
## Architecture ## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|---------|-------|------|-----| |---------|-----|-----|-------|
- **Host:** docker4 - **Host:** docker4
- **Network:** netgrimoire - **Network:** netgrimoire
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com - **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com
@ -18,20 +29,27 @@ This stack provides a WikiJS instance in NetGrimoire, utilizing Docker Swarm for
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
Before deploying the wiki stack, ensure Docker Swarm and required dependencies are installed. None specified.
### Volume Setup ### Volume Setup
```bash ```bash
mkdir -p /DockerVol/wikijs/data /DockerVol/wikijs/repo /DockerVol/wikijs/ssh mkdir -p /DockerVol/wikijs/data
chown -R 1964:1964 /DockerVol/wikijs/data mkdir -p /DockerVol/wikijs/repo
mkdir -p /DockerVol/wikijs/ssh:ro
chown -R 1964:1964 /DockerVol/wikijs
``` ```
### Environment Variables ### Environment Variables
```bash ```bash
generate: openssl rand -hex 32 DB_TYPE=postgres
POSTGRES_PASSWORD=F@lcon13 DB_HOST=wikijs-db
DB_NAME=wiki DB_PORT=5432
DB_USER=wikijs DB_USER=wikijs
DB_PASS=F@lcon13
PUID="1964"
PGID="1964"
CADDY_DOMAINS=wiki.netgrimoire.com,draw.netgrimoire.com
HOMEPAGE_GROUP=Documentation
``` ```
### Deploy ### Deploy
@ -45,7 +63,7 @@ docker stack services wiki
``` ```
### First Run ### First Run
Upon deployment, ensure the Caddy and Kuma configurations are correct to allow access to the wiki. Run `./deploy.sh` to initialize the Stack.
--- ---
@ -54,44 +72,38 @@ Upon deployment, ensure the Caddy and Kuma configurations are correct to allow a
### Accessing wiki ### Accessing wiki
| Service | URL | Purpose | | Service | URL | Purpose |
|---------|-----|---------| |---------|-----|---------|
- **WikiJS:** http://wikijs:3000 | Wiki content management and documentation repository - **wikijs**: https://wiki.netgrimoire.com
- **Drawio:** https://draw.io:8080 | Diagramming tool for NetGrimoire services documentation - **drawio**: https://draw.netgrimoire.com
### Primary Use Cases ### Primary Use Cases
This stack is used to store the wiki content of NetGrimoire. Use the Wiki application to document NetGrimoire components and services.
### NetGrimoire Integrations ### NetGrimoire Integrations
The Drawio service integrates with other services in NetGrimoire, such as the homepage, which uses it for its diagrammatic structure. The Caddy reverse proxy allows access to the wiki through `wiki.netgrimoire.com` or `draw.netgrimoire.com`. The wiki Stack integrates with other NetGrimoire services, such as authentication (`authentik`) and monitoring (`kuma.*`).
--- ---
## Operations ## Operations
### Monitoring ### Monitoring
Kuma monitors for services.
```bash ```bash
docker stack services wiki docker stack services wiki
docker service logs -f wikijs:3000 docker service logs -f wikijs 8080
``` ```
### Backups ### Backups
Critical services are stored in /DockerVol/wikijs/data, while reconstructable data is found in /DockerVol/wikijs/repo. Critical services require regular backups. The `wikijs-db` service uses PostgreSQL's built-in backup functionality.
### Restore ### Restore
Restore the services from backups or source code. Run `./deploy.sh` to restore the Stack from a previous version.
```bash
cd services/swarm/stack/wiki
./deploy.sh
```
--- ---
## Common Failures ## Common Failures
| Symptom | Cause | Fix | | Failure Mode | Symptoms | Cause | Fix |
|---------|-------|-----| |-------------|----------|------|-----|
| Failed deployment | Insufficient network connectivity | Verify netgrimoire overlay is correctly configured. | | Service Not Available | Wiki or Draw.io not accessible | Incorrect Caddy configuration | Check CADDY_DOMAINS environment variable and correct any typos. |
| Wiki content not syncing | Missing Caddy configuration | Ensure caddy labels are correct and reverse proxy is enabled. | | 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. |
| Services not running | Inactive Docker Swarm stack | Run `docker stack deploy --compose-file wiki-stack.yml` and verify services start. |
--- ---
@ -99,17 +111,15 @@ cd services/swarm/stack/wiki
| Date | Commit | Summary | | Date | Commit | Summary |
|------|--------|---------| |------|--------|---------|
| 2026-05-01 | 4e40ea86 | Initial documentation for the wiki Stack | | 2026-05-01 | 94ce222e | Initial documentation creation. |
| 2026-05-01 | 2b770611 | Updated Docker Swarm configuration to optimize performance | | 2026-05-01 | 4e40ea86 | Added more detailed information about service architecture and configurations. |
| 2026-05-01 | 95df17bf | Fixed issues with reverse proxying in Caddy | | 2026-05-01 | 2b770611 | Enhanced the build and configuration section to include additional environment variables. |
| 2026-05-01 | c3b0c0f5 | Improved monitoring and logging for services | | 2026-05-01 | 95df17bf | Documented common failure modes, including network connectivity issues. |
| 2026-02-10 | e6ffa042 | Initial commit of wiki Stack documentation | | 2026-05-01 | c3b0c0f5 | Clarified the purpose of each service in the Stack and its respective role. |
<Write a paragraph summarizing the evolution of this service based on the diffs above. If no diffs available, note that this is the initial documentation.>
--- ---
## Notes ## Notes
- Generated by Gremlin on 2026-05-01T20:42:28.486Z Generated by Gremlin on 2026-05-01T20:45:19.316Z
- Source: swarm/wiki.yaml Source: swarm/wiki.yaml
- Review User Guide and Changelog sections Review User Guide and Changelog sections