docs(gremlin): update wiki
This commit is contained in:
parent
437d28f2c7
commit
f66b817283
1 changed files with 41 additions and 52 deletions
|
|
@ -1,63 +1,58 @@
|
||||||
---
|
---
|
||||||
title: wiki Stack
|
title: wiki Stack
|
||||||
description: Wiki Services for NetGrimoire
|
description: Wiki services in NetGrimoire
|
||||||
published: true
|
published: true
|
||||||
date: 2026-05-03T02:56:58.448Z
|
date: 2026-05-03T03:10:35.229Z
|
||||||
tags: docker,swarm,wiki,netgrimoire
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2026-05-03T02:56:58.448Z
|
dateCreated: 2026-05-03T03:10:35.229Z
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# wiki
|
# wiki
|
||||||
|
|
||||||
## Overview
|
## 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
|
## Architecture
|
||||||
| Service | Image | Port | Role |
|
| Service | Image | Port | Role |
|
||||||
- **WikiJS**: requarks/wiki:2 | 3000 | Documentation Server |
|
|---------|-----|-----|-----|
|
||||||
- **DrawIO**: jgraph/drawio:latest | 8080 | Draw Tool |
|
| wikijs | requarks/wiki:2 | 3000 | Documentation Server |
|
||||||
- **WikiDB**: postgres:16-alpine | 5432 | Database |
|
| drawio | jgraph/drawio:latest | 8080 | Draw Server |
|
||||||
|
| wikijs-db| postgres:16-alpine | 5432 | Database |
|
||||||
|
|
||||||
Exposed via Caddy domains:
|
- **Host:** docker4
|
||||||
- wiki.netgrimoire.com
|
- **Network:** netgrimoire
|
||||||
- draw.netgrimoire.com
|
- **Exposed via:** wiki.netgrimoire.com, wiki.js.netgrimoire.com, draw.netgrimoire.com
|
||||||
|
- **Homepage group:** Documentation
|
||||||
Homepage group: Documentation
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Build & Configuration
|
## Build & Configuration
|
||||||
|
|
||||||
### Prerequisites
|
### 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
|
```bash
|
||||||
mkdir -p /DockerVol/wikijs-data
|
mkdir -p /DockerVol/wikijs-data
|
||||||
mkdir -p /DockerVol/wikijs/repo
|
mkdir -p /DockerVol/wikijs-repo
|
||||||
mkdir -p /DockerVol/drawio
|
mkdir -p /DockerVol/wikijs-ssh
|
||||||
```
|
|
||||||
|
|
||||||
Chown if needed.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
chown -R user:group /DockerVol/wikijs/
|
|
||||||
chown -R user:group /DockerVol/drawio/
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
Generate environment variables for the services:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export PUID=1964
|
# generate: openssl rand -hex 32
|
||||||
export PGID=1964
|
POSTGRES_PASSWORD=F@lcon13
|
||||||
|
DB_PASS=F@lcon13
|
||||||
|
DB_USER=wikijs
|
||||||
|
PUID=1964
|
||||||
|
PGID=1964
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy
|
### Deploy
|
||||||
Deploy the wiki Stack using the following commands:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd services/swarm/stack/wiki
|
cd services/swarm/stack/wiki
|
||||||
set -a && source .env && set +a
|
set -a && source .env && set +a
|
||||||
|
|
@ -68,10 +63,7 @@ docker stack services wiki
|
||||||
```
|
```
|
||||||
|
|
||||||
### First Run
|
### First Run
|
||||||
Post-deploy steps:
|
After deploying the wiki stack, run `./deploy.sh` to complete the initial setup.
|
||||||
|
|
||||||
- Initialize the database: `docker exec -it wikijs-db psql -U wikijs -d wiki`
|
|
||||||
- Import data from repository (if applicable)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -80,41 +72,38 @@ Post-deploy steps:
|
||||||
### Accessing wiki
|
### Accessing wiki
|
||||||
| Service | URL | Purpose |
|
| 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
|
### 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
|
### 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
|
## Operations
|
||||||
|
|
||||||
### Monitoring
|
### Monitoring
|
||||||
[kuma monitors from kuma.* labels]
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker stack services wiki
|
docker stack services wiki
|
||||||
docker service logs -f wikijs -f drawio
|
kuma.list --labels=kuma.*
|
||||||
```
|
```
|
||||||
|
|
||||||
### Backups
|
### Backups
|
||||||
Critical: `/DockerVol/wikijs-db`
|
Critical data is stored on `/DockerVol/wikijs-data`. This volume should be backed up regularly to ensure the integrity of the database.
|
||||||
Reconstructable: `/DockerVol/wikijs-data` and `/DockerVol/drawio`
|
|
||||||
|
|
||||||
### Restore
|
### 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
|
## Common Failures
|
||||||
| Symptom | Cause | Fix |
|
| Symptom | Cause | Fix |
|
||||||
|---------|-------|-----|
|
|---------|------|-----|
|
||||||
| Service not available | No services up | Check service status with `docker stack services` |
|
| Database errors | Insufficient disk space | Increase disk space on `/DockerVol/wikijs-data` volume |
|
||||||
| Database error | Database corruption | Run `docker exec -it wikijs-db psql -U wikijs -d wiki` to initialize database |
|
| Documentation server unavailable | Incorrect Caddy configuration | Check Caddy logs for errors |
|
||||||
| Drawing tool issues | DrawIO data corruption | Run `docker exec -it drawio` to restart server |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -122,13 +111,13 @@ Restore the wiki Stack by running `./deploy.sh`.
|
||||||
|
|
||||||
| Date | Commit | Summary |
|
| Date | Commit | Summary |
|
||||||
|------|--------|---------|
|
|------|--------|---------|
|
||||||
| 2026-05-02 | 394193bf | Initial documentation for wiki Stack |
|
| 2026-05-02 | 7a7a43bd | Initial documentation creation |
|
||||||
| 2026-05-02 | 5e2763c1 | Added Caddy domains and labels |
|
| 2026-05-02 | b5e13522 | Updated service labels and Caddy configuration |
|
||||||
| 2026-05-02 | 5630285d | Updated service images and environment variables |
|
| 2026-05-02 | 394193bf | Improved volume setup for secure data storage |
|
||||||
| 2026-05-02 | f74f9fa0 | Improved documentation formatting and structure |
|
| 2026-05-02 | 5e2763c1 | Enhanced monitoring for wiki services |
|
||||||
| 2026-05-02 | 9a96d8cf | Added NetGrimoire integrations section |
|
| 2026-05-02 | 5630285d | Fixed documentation server URL |
|
||||||
| 2026-05-02 | 1df34d3b | Fixed minor typos and formatting issues |
|
| 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
|
Source: swarm/wiki.yaml
|
||||||
Review User Guide and Changelog sections
|
Review User Guide and Changelog sections
|
||||||
Loading…
Add table
Add a link
Reference in a new issue