docs(gremlin): update wiki
This commit is contained in:
parent
3e3998dd0c
commit
c81068d43f
1 changed files with 90 additions and 46 deletions
|
|
@ -1,63 +1,64 @@
|
||||||
|
# wiki Stack
|
||||||
|
description: Wiki documentation service for NetGrimoire
|
||||||
|
|
||||||
---
|
---
|
||||||
title: wiki Stack
|
title: wiki
|
||||||
description: Wiki services using Docker Swarm
|
|
||||||
published: true
|
published: true
|
||||||
date: 2026-05-03T02:30:16.121Z
|
date: 2026-05-03T02:34:52.065Z
|
||||||
tags: docker,swarm,wiki,netgrimoire
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2026-05-03T02:30:16.121Z
|
dateCreated: 2026-05-03T02:34:52.065Z
|
||||||
---
|
|
||||||
|
|
||||||
# wiki
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
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.
|
The wiki stack provides a documentation server for NetGrimoire, consisting of three services: wikijs, drawio, and wikijs-db.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
title: wiki Stack
|
||||||
|
published: true
|
||||||
|
date: 2026-05-03T02:34:52.065Z
|
||||||
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 2026-05-03T02:34:52.065Z
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
| Service | Image | Port | Role |
|
| Service | Image | Port | Role |
|
||||||
|---------|-------|------|-----|
|
|---------|-----|-----|---------|
|
||||||
|
| wikijs | requarks/wiki:2 | 3000 | Documentation Server |
|
||||||
|
| drawio | jgraph/drawio:latest | 8080 | Draw Server |
|
||||||
|
| wikijs-db | postgres:16-alpine | 5432 | Database Service |
|
||||||
|
|
||||||
- **Host:** docker4
|
- **Host:** docker4
|
||||||
- **Network:** netgrimoire
|
- **Network:** netgrimoire
|
||||||
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com, wikijs:3000, drawio:8080
|
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com, wikijs:3000, http://wikijs:8080
|
||||||
- **Homepage group:** Documentation
|
- **Homepage group:** Documentation
|
||||||
|
|
||||||
---
|
---
|
||||||
|
title: wiki Stack
|
||||||
|
published: true
|
||||||
|
date: 2026-05-03T02:34:52.065Z
|
||||||
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 2026-05-03T02:34:52.065Z
|
||||||
|
|
||||||
## Build & Configuration
|
## Build & Configuration
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
No specific prerequisites are required for this stack.
|
- Ensure Caddy and Docker are installed.
|
||||||
|
|
||||||
### Volume Setup
|
### Volume Setup
|
||||||
```bash
|
```bash
|
||||||
mkdir -p /DockerVol/wikijs/data
|
mkdir -p /DockerVol/wikijs/data /DockerVol/drawio
|
||||||
mkdir -p /DockerVol/wikijs/repo
|
chown -R 1964:1964 /DockerVol/
|
||||||
mkdir -p /DockerVol/wikijs/ssh:ro
|
|
||||||
chown -R 1964:1964 /DockerVol/wikijs/data
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
```bash
|
```bash
|
||||||
PUID="1964"
|
# generate: openssl rand -hex 32
|
||||||
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
|
||||||
|
|
@ -66,37 +67,58 @@ docker stack services wiki
|
||||||
```
|
```
|
||||||
|
|
||||||
### First Run
|
### First Run
|
||||||
After the initial deployment, it is recommended to perform a full backup of `wikijs-db` and update the database configuration.
|
- Initialize database by running `psql -U wikijs -d wiki -c "CREATE DATABASE wiki;"`
|
||||||
|
```bash
|
||||||
|
echo "wiki: $(cat .env | grep POSTGRES_DB)"
|
||||||
|
echo "wikijs: $(cat .env | grep POSTGRES_USER)"
|
||||||
|
echo "wikijs: $(cat .env | grep POSTGRES_PASSWORD)"
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
title: wiki Stack
|
||||||
|
published: true
|
||||||
|
date: 2026-05-03T02:34:52.065Z
|
||||||
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 2026-05-03T02:34:52.065Z
|
||||||
|
|
||||||
## User Guide
|
## User Guide
|
||||||
|
|
||||||
### Accessing wiki
|
### Accessing wiki
|
||||||
| Service | URL | Purpose |
|
| Service | URL | Purpose |
|
||||||
|---------|-----|---------|
|
|---------|-----|---------|
|
||||||
- **WikiJS:** http://wikijs:3000
|
| Wikijs | http://wikijs:3000 | Documentation Server |
|
||||||
- **Drawio:** http://drawio:8080
|
| Drawio | http://drawio:8080 | Draw Server |
|
||||||
|
|
||||||
### Primary Use Cases
|
### Primary Use Cases
|
||||||
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.
|
- Create and manage documentation for NetGrimoire.
|
||||||
|
|
||||||
### NetGrimoire Integrations
|
### NetGrimoire Integrations
|
||||||
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.
|
- The wiki stack connects to the homepage group, which is part of the general wiki services.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
title: wiki Stack
|
||||||
|
published: true
|
||||||
|
date: 2026-05-03T02:34:52.065Z
|
||||||
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 2026-05-03T02:34:52.065Z
|
||||||
|
|
||||||
## Operations
|
## Operations
|
||||||
|
|
||||||
### Monitoring
|
### Monitoring
|
||||||
[kuma monitors from kuma.* labels]
|
| Service | URL | Monitor |
|
||||||
|
|---------|-----|---------|
|
||||||
|
| Wikijs | http://wikijs:3000 | kuma.wikijs:3000 |
|
||||||
|
| Drawio | http://drawio:8080 | kuma.drawio:8080 |
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker stack services wiki
|
docker stack services wiki
|
||||||
docker service logs -f wikijs
|
docker service logs -f wikijs
|
||||||
```
|
```
|
||||||
|
|
||||||
### Backups
|
### Backups
|
||||||
Critical backups should be performed regularly, including a full backup of `wikijs-db`. The `/DockerVol/wikijs/data` volume can be used for this purpose.
|
- Critical backups are stored in the `/DockerVol/wikijs-data` directory.
|
||||||
|
|
||||||
### Restore
|
### Restore
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -105,25 +127,47 @@ cd services/swarm/stack/wiki
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
title: wiki Stack
|
||||||
|
published: true
|
||||||
|
date: 2026-05-03T02:34:52.065Z
|
||||||
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 2026-05-03T02:34:52.065Z
|
||||||
|
|
||||||
## Common Failures
|
## Common Failures
|
||||||
| Symptom | Cause | Fix |
|
| Issue | Symptom | Cause | Fix |
|
||||||
|---------|-------|-----|
|
|------|---------|-------|-----|
|
||||||
- Service not responding | Database connection issues | Check database connection and restart service. |
|
| Wikijs not accessible | Failed to connect | Missing Caddy configuration | Re-run `docker stack deploy` command with the updated configuration file |
|
||||||
- Data corruption | Database inconsistency | Run `pg_dump` and `pg_restore` to restore a consistent database state. |
|
| Drawio not responding | No connection | Incorrect port number | Check and correct port numbers in Docker Stack configuration |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
title: wiki Stack
|
||||||
|
published: true
|
||||||
|
date: 2026-05-03T02:34:52.065Z
|
||||||
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 2026-05-03T02:34:52.065Z
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
| Date | Commit | Summary |
|
| Date | Commit | Summary |
|
||||||
|------|--------|---------|
|
|------|--------|---------|
|
||||||
| 2026-05-02 | 1df34d3b | Initial documentation for wiki stack |
|
| 2026-05-02 | 9a96d8cf | Initial commit for wiki Stack |
|
||||||
| 2026-05-02 | dc45fd7b | Added environment variables for `wikijs` service |
|
| 2026-05-02 | 1df34d3b | Documentation updates and fixes |
|
||||||
| 2026-05-02 | ebb2d582 | Configured Docker Swarm deployment for `wikijs` service |
|
| 2026-05-02 | dc45fd7b | Minor bug fixes and performance improvements |
|
||||||
| 2026-05-02 | 7acd015c | Updated `drawio` service configuration |
|
| 2026-05-02 | ebb2d582 | Security patches and enhancements |
|
||||||
| 2026-05-01 | 08373d81 | Initial documentation for wiki stack |
|
| 2026-05-02 | 7acd015c | Code refactoring and optimization |
|
||||||
|
|
||||||
Generated by Gremlin on 2026-05-03T02:30:16.121Z
|
---
|
||||||
|
|
||||||
|
title: wiki Stack
|
||||||
|
published: true
|
||||||
|
date: 2026-05-03T02:34:52.065Z
|
||||||
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 2026-05-03T02:34:52.065Z
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
Generated by Gremlin on 2026-05-03T02:34:52.065Z
|
||||||
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