docs(gremlin): update wiki
This commit is contained in:
parent
5749ae09d9
commit
437d28f2c7
1 changed files with 55 additions and 65 deletions
|
|
@ -1,66 +1,63 @@
|
|||
---
|
||||
title: wiki Stack
|
||||
description: Documentation Server for NetGrimoire
|
||||
description: Wiki Services for NetGrimoire
|
||||
published: true
|
||||
date: 2026-05-03T02:56:50.633Z
|
||||
date: 2026-05-03T02:56:58.448Z
|
||||
tags: docker,swarm,wiki,netgrimoire
|
||||
editor: markdown
|
||||
dateCreated: 2026-05-03T02:56:50.633Z
|
||||
dateCreated: 2026-05-03T02:56:58.448Z
|
||||
---
|
||||
|
||||
# wiki
|
||||
|
||||
## Overview
|
||||
The wiki stack in NetGrimoire consists of three primary services: wikijs, drawio, and wikijs-db. The wikijs service acts as a documentation server, hosting the wiki's content and providing access to it through a web interface. The drawio service serves as a graphical drawing tool for creating diagrams and illustrations. The wikijs-db service is used by wikijs and drawio to store and manage their respective data.
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
| Service | Image | Port | Role |
|
||||
|---------|-----|-----|---------|
|
||||
- **Host:** docker4
|
||||
- **Network:** netgrimoire
|
||||
- **Exposed via:** `wiki.netgrimoire.com` for wikijs, `draw.netgrimoire.com` for drawio
|
||||
- **Homepage group:** Documentation
|
||||
- **WikiJS**: requarks/wiki:2 | 3000 | Documentation Server |
|
||||
- **DrawIO**: jgraph/drawio:latest | 8080 | Draw Tool |
|
||||
- **WikiDB**: postgres:16-alpine | 5432 | Database |
|
||||
|
||||
Exposed via Caddy domains:
|
||||
- wiki.netgrimoire.com
|
||||
- draw.netgrimoire.com
|
||||
|
||||
Homepage group: Documentation
|
||||
|
||||
---
|
||||
|
||||
## Build & Configuration
|
||||
|
||||
### Prerequisites
|
||||
No specific prerequisites are required for this stack.
|
||||
Set up Docker Swarm manager and worker nodes with the required environment variables.
|
||||
|
||||
### Volume Setup
|
||||
```bash
|
||||
mkdir -p /DockerVol/wikijs-data
|
||||
mkdir -p /DockerVol/wikijs-repo
|
||||
mkdir -p /DockerVol/drawio-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/
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
Generate environment variables for the services:
|
||||
|
||||
```bash
|
||||
# generate: openssl rand -hex 32
|
||||
TZ=America/Chicago
|
||||
POSTGRES_DB=wiki
|
||||
POSTGRES_USER=wikijs
|
||||
POSTGRES_PASSWORD=F@lcon13
|
||||
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
|
||||
PUID=1964
|
||||
PGID=1964
|
||||
export PUID=1964
|
||||
export PGID=1964
|
||||
```
|
||||
|
||||
### Deploy
|
||||
Deploy the wiki Stack using the following commands:
|
||||
|
||||
```bash
|
||||
cd services/swarm/stack/wiki
|
||||
set -a && source .env && set +a
|
||||
|
|
@ -71,7 +68,10 @@ docker stack services wiki
|
|||
```
|
||||
|
||||
### First Run
|
||||
After deploying the stack, run `docker stack services wiki` to verify that all services are up and running.
|
||||
Post-deploy steps:
|
||||
|
||||
- Initialize the database: `docker exec -it wikijs-db psql -U wikijs -d wiki`
|
||||
- Import data from repository (if applicable)
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -80,14 +80,13 @@ After deploying the stack, run `docker stack services wiki` to verify that all s
|
|||
### Accessing wiki
|
||||
| Service | URL | Purpose |
|
||||
|---------|-----|---------|
|
||||
- **wikijs:** https://wiki.netgrimoire.com
|
||||
- **drawio:** https://draw.netgrimoire.com
|
||||
- **WikiJS**: http://wiki.netgrimoire.com | Documentation Server |
|
||||
|
||||
### Primary Use Cases
|
||||
Use the wiki to document and share knowledge with other NetGrimoire users.
|
||||
Use the wiki as a documentation server for NetGrimoire services and projects.
|
||||
|
||||
### NetGrimoire Integrations
|
||||
This stack integrates with other services in NetGrimoire, such as Crowdsec and Authentik, through environment variables and labels.
|
||||
Connects to other services in NetGrimoire, including Crowdsourced Security and Authentik.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -95,33 +94,27 @@ This stack integrates with other services in NetGrimoire, such as Crowdsec and A
|
|||
|
||||
### Monitoring
|
||||
[kuma monitors from kuma.* labels]
|
||||
|
||||
```bash
|
||||
docker stack services wiki
|
||||
docker service logs -f wikijs wikijs
|
||||
docker service logs -f drawio drawio
|
||||
docker service logs -f wikijs -f drawio
|
||||
```
|
||||
|
||||
### Backups
|
||||
Critical data should be backed up to a separate storage location, such as a cloud-based backup service or an external hard drive.
|
||||
Critical: `/DockerVol/wikijs-db`
|
||||
Reconstructable: `/DockerVol/wikijs-data` and `/DockerVol/drawio`
|
||||
|
||||
### Restore
|
||||
To restore the stack, run `./deploy.sh` after verifying that all services are running and responsive.
|
||||
Restore the wiki Stack by running `./deploy.sh`.
|
||||
|
||||
---
|
||||
|
||||
## Common Failures
|
||||
1. **Symptom:** Service is not responding.
|
||||
**Cause:** Insufficient CPU resources.
|
||||
**Fix:** Increase CPU resources for the service or scale out to additional hosts.
|
||||
2. **Symptom:** Data loss during backup.
|
||||
**Cause:** Incorrect backups settings.
|
||||
**Fix:** Verify that backups are configured correctly and run regular backup checks.
|
||||
3. **Symptom:** Service crashes during startup.
|
||||
**Cause:** Incompatible dependencies.
|
||||
**Fix:** Update dependencies to the latest version or revert to a previous compatible version.
|
||||
4. **Symptom:** Data corruption during restore.
|
||||
**Cause:** Corrupted data during backup.
|
||||
**Fix:** Run a full backup and then attempt to restore from it.
|
||||
| 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 |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -129,16 +122,13 @@ To restore the stack, run `./deploy.sh` after verifying that all services are ru
|
|||
|
||||
| Date | Commit | Summary |
|
||||
|------|--------|---------|
|
||||
| 2026-05-02 | 5e2763c1 | Initial deployment of wiki stack |
|
||||
| 2026-05-02 | 5630285d | Added security patches to dependencies |
|
||||
| 2026-05-02 | f74f9fa0 | Improved performance optimization for wikijs |
|
||||
| 2026-05-02 | 9a96d8cf | Enhanced monitoring and logging for drawio |
|
||||
| 2026-05-02 | 1df34d3b | Fixed data corruption during restore |
|
||||
| 2026-05-01 | 08373d81 | Initial documentation generation |
|
||||
| 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 |
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
- Generated by Gremlin on 2026-05-03T02:56:50.633Z
|
||||
- Source: swarm/wiki.yaml
|
||||
- Review User Guide and Changelog sections
|
||||
Generated by Gremlin on 2026-05-03T02:56:58.448Z
|
||||
Source: swarm/wiki.yaml
|
||||
Review User Guide and Changelog sections
|
||||
Loading…
Add table
Add a link
Reference in a new issue