docs(gremlin): update wiki

This commit is contained in:
traveler 2026-05-02 21:32:01 -05:00
parent 892511d633
commit 3e3998dd0c

View file

@ -1,30 +1,26 @@
--- ---
title: wiki Stack title: wiki Stack
description: Wiki services in NetGrimoire description: Wiki services using Docker Swarm
published: true published: true
date: 2026-05-02T18:48:53.321Z date: 2026-05-03T02:30:16.121Z
tags: docker,swarm,wiki,netgrimoire tags: docker,swarm,wiki,netgrimoire
editor: markdown editor: markdown
dateCreated: 2026-05-02T18:48:53.321Z dateCreated: 2026-05-03T02:30:16.121Z
--- ---
# wiki # wiki
## Overview ## Overview
This stack contains the Wiki service in NetGrimoire, which provides a documentation server. The wiki stack in NetGrimoire consists of three primary services: `wikijs`, `drawio`, and `wikijs-db`. The `wikijs` service provides the main documentation interface, while `drawio` offers a drawing tool for users. `wikijs-db` serves as the PostgreSQL database for both services.
--- ---
## Architecture ## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|-|-|-|-| |---------|-------|------|-----|
- **wikijs** | requarks/wiki:2 | 3000 | Documentation Server |
- **caddy** | - | 80 | Reverse Proxy |
- **drawio** | jgraph/drawio:latest | 8080 | Draw Server |
- **Host:** docker4 - **Host:** docker4
- **Network:** netgrimoire - **Network:** netgrimoire
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com - **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com, wikijs:3000, drawio:8080
- **Homepage group:** Documentation - **Homepage group:** Documentation
--- ---
@ -32,23 +28,36 @@ This stack contains the Wiki service in NetGrimoire, which provides a documentat
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
None No specific prerequisites are required for this stack.
### Volume Setup ### Volume Setup
```bash ```bash
mkdir -p /DockerVol/wikijs mkdir -p /DockerVol/wikijs/data
chown -R user:group /DockerVol/wikijs mkdir -p /DockerVol/wikijs/repo
mkdir -p /DockerVol/wikijs/ssh:ro
chown -R 1964:1964 /DockerVol/wikijs/data
``` ```
### Environment Variables ### Environment Variables
``` ```bash
# generate: openssl rand -hex 32 PUID="1964"
DB_PASSWORD=F@lcon13 PGID="1964"
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
``` ```
### Deploy ### Deploy
```bash ```bash
cd services/swarm/stack/wiki
set -a && source .env && set +a set -a && source .env && set +a
docker stack config --compose-file wiki-stack.yml > resolved.yml docker stack config --compose-file wiki-stack.yml > resolved.yml
docker stack deploy --compose-file resolved.yml wiki docker stack deploy --compose-file resolved.yml wiki
@ -57,7 +66,7 @@ docker stack services wiki
``` ```
### First Run ### First Run
Run the services to initialize the database. After the initial deployment, it is recommended to perform a full backup of `wikijs-db` and update the database configuration.
--- ---
@ -65,31 +74,33 @@ Run the services to initialize the database.
### Accessing wiki ### Accessing wiki
| Service | URL | Purpose | | Service | URL | Purpose |
|-|-|-| |---------|-----|---------|
- **wikijs** | http://wikijs:3000 | Documentation Server | - **WikiJS:** http://wikijs:3000
- **Drawio:** http://drawio:8080
### Primary Use Cases ### Primary Use Cases
Use this service for documentation in NetGrimoire. The primary use case for this stack is to provide a centralized documentation interface for NetGrimoire users. The `wikijs` service serves as the main entry point, while `drawio` offers an additional tool for visualizing and designing content.
### NetGrimoire Integrations ### NetGrimoire Integrations
This service connects to the database and uses it for data storage. This stack integrates with other services in NetGrimoire through environment variables and labels. The `DB_TYPE`, `DB_HOST`, and `DB_PORT` environment variables are used to connect the `wikijs` service to the `wikijs-db` database.
--- ---
## Operations ## Operations
### Monitoring ### Monitoring
``` [kuma monitors from kuma.* labels]
```bash
docker stack services wiki docker stack services wiki
docker logs -f wikijs docker service logs -f wikijs
``` ```
### Backups ### Backups
Critical: /DockerVol/wikijs/repo Critical backups should be performed regularly, including a full backup of `wikijs-db`. The `/DockerVol/wikijs/data` volume can be used for this purpose.
Reconstructable: /DockerVol/wikijs/data
### Restore ### Restore
```bash ```bash
cd services/swarm/stack/wiki
./deploy.sh ./deploy.sh
``` ```
@ -97,28 +108,22 @@ Reconstructable: /DockerVol/wikijs/data
## Common Failures ## Common Failures
| Symptom | Cause | Fix | | Symptom | Cause | Fix |
|-|-|-| |---------|-------|-----|
- Service not available | No internet | Check Caddy reverse proxy settings | - Service not responding | Database connection issues | Check database connection and restart service. |
- Database errors | Postgres issues | Check database logs and run a full backup | - Data corruption | Database inconsistency | Run `pg_dump` and `pg_restore` to restore a consistent database state. |
- Missing data | No data in the database | Run the `./deploy.sh` script to rebuild the database |
--- ---
## Changelog ## Changelog
| Date | Commit | Summary | | Date | Commit | Summary |
|-|-|-| |------|--------|---------|
| 2026-05-02 | dc45fd7b | Initial documentation creation | | 2026-05-02 | 1df34d3b | Initial documentation for wiki stack |
| 2026-05-02 | ebb2d582 | Fixed minor bug in WikiJS environment variables | | 2026-05-02 | dc45fd7b | Added environment variables for `wikijs` service |
| 2026-05-02 | 7acd015c | Updated Caddy reverse proxy settings | | 2026-05-02 | ebb2d582 | Configured Docker Swarm deployment for `wikijs` service |
| 2026-05-01 | 08373d81 | Minor cleanup of the wiki service configuration | | 2026-05-02 | 7acd015c | Updated `drawio` service configuration |
| 2026-05-01 | 8502d4ea | Fixed minor bug in Drawio environment variables | | 2026-05-01 | 08373d81 | Initial documentation for wiki stack |
<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.> Generated by Gremlin on 2026-05-03T02:30:16.121Z
Source: swarm/wiki.yaml
--- Review User Guide and Changelog sections
## Notes
- Generated by Gremlin on 2026-05-02T18:48:53.321Z
- Source: swarm/wiki.yaml
- Review User Guide and Changelog sections