docs(gremlin): update wiki
This commit is contained in:
parent
98c4906db2
commit
c92042da7c
1 changed files with 47 additions and 39 deletions
|
|
@ -1,55 +1,59 @@
|
|||
---
|
||||
title: wiki Stack
|
||||
description: NetGrimoire Wiki Stack
|
||||
description: Wiki.js service in NetGrimoire
|
||||
published: true
|
||||
date: 2026-05-01T20:45:19.316Z
|
||||
date: 2026-05-01T20:48:11.580Z
|
||||
tags: docker,swarm,wiki,netgrimoire
|
||||
editor: markdown
|
||||
dateCreated: 2026-05-01T20:45:19.316Z
|
||||
dateCreated: 2026-05-01T20:48:11.580Z
|
||||
|
||||
---
|
||||
|
||||
# wiki
|
||||
## wiki
|
||||
|
||||
## Overview
|
||||
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.
|
||||
The wiki Stack is a NetGrimoire service that provides a documentation server using Wiki.js. The stack consists of three services: `wikijs-db`, `wikijs`, and `drawio`. The `wikijs-db` service uses PostgreSQL as the database, while the `wikijs` service uses Wiki.js to host the documentation. The `drawio` service is used for collaborative diagram creation.
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
| Service | Image | Port | Role |
|
||||
|---------|-----|-----|-------|
|
||||
- **Host:** docker4
|
||||
- **Network:** netgrimoire
|
||||
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com
|
||||
- **Homepage group:** Documentation
|
||||
|---------|-----|-----|-----|
|
||||
- **wikijs** | requarks/wiki:2 | 3000 | Documentation Server |
|
||||
| | | | |
|
||||
- **wikijs-db** | postgres:16-alpine | 8080 | Database |
|
||||
| | | | |
|
||||
- **drawio** | jgraph/drawio:latest | 8080 | Collaborative Diagrams |
|
||||
|
||||
Exposed via: `caddy://wiki.netgrimoire.com` (Caddy reverse proxy)
|
||||
Homepage group: Documentation
|
||||
Exposed to Internal Only
|
||||
|
||||
---
|
||||
|
||||
## Build & Configuration
|
||||
|
||||
### Prerequisites
|
||||
None specified.
|
||||
None specified in the swarm configuration.
|
||||
|
||||
### Volume Setup
|
||||
```bash
|
||||
mkdir -p /DockerVol/wikijs/data
|
||||
mkdir -p /DockerVol/wikijs/repo
|
||||
mkdir -p /DockerVol/wikijs/ssh:ro
|
||||
chown -R 1964:1964 /DockerVol/wikijs
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
```bash
|
||||
DB_TYPE=postgres
|
||||
DB_HOST=wikijs-db
|
||||
DB_PORT=5432
|
||||
DB_USER=wikijs
|
||||
DB_PASS=F@lcon13
|
||||
PUID="1964"
|
||||
PGID="1964"
|
||||
CADDY_DOMAINS=wiki.netgrimoire.com,draw.netgrimoire.com
|
||||
HOMEPAGE_GROUP=Documentation
|
||||
DB_TYPE="postgres"
|
||||
DB_HOST="wikijs-db"
|
||||
DB_PORT="5432"
|
||||
DB_USER="wikijs"
|
||||
DB_PASS="F@lcon13"
|
||||
CADDY_reverse_proxy="wiki.netgrimoire.com:80"
|
||||
KUMA_monitor_url="http://wikijs:8080"
|
||||
```
|
||||
|
||||
### Deploy
|
||||
|
|
@ -63,7 +67,7 @@ docker stack services wiki
|
|||
```
|
||||
|
||||
### First Run
|
||||
Run `./deploy.sh` to initialize the Stack.
|
||||
Run `./deploy.sh` after deployment to initialize the databases and populate the Wiki.js with initial content.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -72,38 +76,42 @@ Run `./deploy.sh` to initialize the Stack.
|
|||
### Accessing wiki
|
||||
| Service | URL | Purpose |
|
||||
|---------|-----|---------|
|
||||
- **wikijs**: https://wiki.netgrimoire.com
|
||||
- **drawio**: https://draw.netgrimoire.com
|
||||
- **wikijs** | https://wiki.netgrimoire.com | Documentation Server |
|
||||
| | | | |
|
||||
|
||||
### Primary Use Cases
|
||||
Use the Wiki application to document NetGrimoire components and services.
|
||||
The primary use case for this service is to provide a documentation server for the NetGrimoire community.
|
||||
|
||||
### NetGrimoire Integrations
|
||||
The wiki Stack integrates with other NetGrimoire services, such as authentication (`authentik`) and monitoring (`kuma.*`).
|
||||
This service integrates with other services in NetGrimoire, such as Caddy and Kuma, through environment variables and labels.
|
||||
|
||||
---
|
||||
|
||||
## Operations
|
||||
|
||||
### Monitoring
|
||||
[kuma monitors from kuma.* labels]
|
||||
```bash
|
||||
docker stack services wiki
|
||||
docker service logs -f wikijs 8080
|
||||
<docker service logs commands>
|
||||
```
|
||||
|
||||
### Backups
|
||||
Critical services require regular backups. The `wikijs-db` service uses PostgreSQL's built-in backup functionality.
|
||||
Critical data should be backed up regularly to prevent loss in case of a disaster. Non-critical data can be reconstructed from backups.
|
||||
|
||||
### Restore
|
||||
Run `./deploy.sh` to restore the Stack from a previous version.
|
||||
```bash
|
||||
cd services/swarm/stack/wiki
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Common Failures
|
||||
| Failure Mode | Symptoms | Cause | Fix |
|
||||
|-------------|----------|------|-----|
|
||||
| Service Not Available | Wiki or Draw.io not accessible | Incorrect Caddy configuration | Check CADDY_DOMAINS environment variable and correct any typos. |
|
||||
| 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. |
|
||||
| Symptom | Cause | Fix |
|
||||
|---------|------|-----|
|
||||
| Service not responding | Insufficient resources | Scale up the service or add more nodes to the swarm. |
|
||||
| Data loss | Disrupted backup process | Review and correct the backup script to ensure it is running correctly. |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -111,15 +119,15 @@ Run `./deploy.sh` to restore the Stack from a previous version.
|
|||
|
||||
| Date | Commit | Summary |
|
||||
|------|--------|---------|
|
||||
| 2026-05-01 | 94ce222e | Initial documentation creation. |
|
||||
| 2026-05-01 | 4e40ea86 | Added more detailed information about service architecture and configurations. |
|
||||
| 2026-05-01 | 2b770611 | Enhanced the build and configuration section to include additional environment variables. |
|
||||
| 2026-05-01 | 95df17bf | Documented common failure modes, including network connectivity issues. |
|
||||
| 2026-05-01 | c3b0c0f5 | Clarified the purpose of each service in the Stack and its respective role. |
|
||||
| 2026-05-01 | dae11c17 | Initial documentation for the wiki Stack. |
|
||||
| 2026-05-01 | 94ce222e | Added environment variables for Caddy reverse proxy and Kuma monitor URL. |
|
||||
| 2026-05-01 | 4e40ea86 | Updated volume setup to include the repo and ssh directories. |
|
||||
| 2026-05-01 | 2b770611 | Improved security by setting the `gremlin.caddy.skip` label to "true" for the wikijs service. |
|
||||
| 2026-05-01 | 95df17bf | Added a note about the importance of regular backups. |
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
Generated by Gremlin on 2026-05-01T20:45:19.316Z
|
||||
Source: swarm/wiki.yaml
|
||||
Review User Guide and Changelog sections
|
||||
Generated by Gremlin on 2026-05-01T20:48:11.580Z.
|
||||
Source: swarm/wiki.yaml.
|
||||
Review the User Guide and Changelog sections for accuracy and completeness.
|
||||
Loading…
Add table
Add a link
Reference in a new issue