docs(gremlin): update wiki
This commit is contained in:
parent
c86f6ae950
commit
7c67bce00f
1 changed files with 48 additions and 36 deletions
|
|
@ -1,54 +1,63 @@
|
||||||
---
|
---
|
||||||
title: wiki Stack
|
title: wiki Stack
|
||||||
description: Wiki services for NetGrimoire documentation server
|
description: Wiki service for NetGrimoire documentation
|
||||||
published: true
|
published: true
|
||||||
date: 2026-05-02T03:42:38.085Z
|
date: 2026-05-02T18:45:51.188Z
|
||||||
tags: docker,swarm,wiki,netgrimoire
|
tags: docker,swarm,wiki,netgrimoire
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2026-05-02T03:42:38.085Z
|
dateCreated: 2026-05-02T18:45:51.188Z
|
||||||
---
|
---
|
||||||
|
|
||||||
# wiki
|
# wiki
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
The wiki stack in NetGrimoire consists of three services: `wikijs`, `drawio`, and a PostgreSQL database managed by `wikijs-db`. The purpose of this setup is to provide a documentation server with features like versioning, collaboration, and drawing capabilities.
|
This stack provides a documentation service for NetGrimoire, utilizing the Wiki.js application.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
| Service | Image | Port | Role |
|
| Service | Image | Port | Role |
|
||||||
|---------|-------|------|------|
|
|---------|-------|------|------|
|
||||||
- **Host:** docker4
|
| Host: | docker4 | | |
|
||||||
- **Network:** netgrimoire
|
| Network: | netgrimoire | | |
|
||||||
- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com (Caddy reverse proxy)
|
| Exposed via: | caddy.netgrimoire.com, wikijs-db:3000 | Internal only | |
|
||||||
- **Homepage group:** Documentation
|
| Homepage group: | Documentation | |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Build & Configuration
|
## Build & Configuration
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
All services require Docker 20.10 or later.
|
No specific prerequisites for this stack.
|
||||||
|
|
||||||
### Volume Setup
|
### 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/wikijs/ssh:ro
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
```bash
|
```bash
|
||||||
PUID=1964
|
PUID="1964"
|
||||||
PGID=1964
|
PGID="1964"
|
||||||
DB_PASSWORD=F@lcon13
|
DB_PASSWORD=F@lcon13
|
||||||
DB_USER=wikijs
|
DB_USER=wikijs
|
||||||
DB_NAME=wiki
|
DB_NAME=wiki
|
||||||
|
DB_TYPE=postgres
|
||||||
|
DB_HOST=wikijs-db
|
||||||
|
DB_PORT=5432
|
||||||
|
CADDY_DOMAIN=caddy.netgrimoire.com
|
||||||
|
CADDY_REVERSE_PROXY=wikijs:3000
|
||||||
|
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,48 +66,46 @@ docker stack services wiki
|
||||||
```
|
```
|
||||||
|
|
||||||
### First Run
|
### First Run
|
||||||
After deployment, enable kuma monitoring by running `kuma monitor`.
|
After deployment, ensure all services are up and running by checking the logs: `docker stack services wiki`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## User Guide
|
## User Guide
|
||||||
|
|
||||||
### Accessing wiki
|
### Accessing wiki
|
||||||
| Service | URL |
|
| Service | URL | Purpose |
|
||||||
|---------|-----|
|
|---------|-----|---------|
|
||||||
- **wikijs:** http://wiki.netgrimoire.com (Caddy reverse proxy)
|
| Wiki.js | http://wikijs:3000 | Documentation Server |
|
||||||
- **drawio:** http://draw.netgrimoire.com (Caddy reverse proxy)
|
|
||||||
|
|
||||||
### Primary Use Cases
|
### Primary Use Cases
|
||||||
This service is used for NetGrimoire documentation server.
|
To access the documentation, navigate to [http://wiki.netgrimoire.com](http://wiki.netgrimoire.com).
|
||||||
|
|
||||||
### NetGrimoire Integrations
|
### NetGrimoire Integrations
|
||||||
This service integrates with `monitors` and `diun`.
|
This service integrates with other NetGrimoire services via environment variables and labels.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Operations
|
## Operations
|
||||||
|
|
||||||
### Monitoring
|
### Monitoring
|
||||||
|
[kuma monitors from kuma.* labels]
|
||||||
```bash
|
```bash
|
||||||
docker stack services wiki
|
docker stack services wiki
|
||||||
kuma monitor --format json
|
docker service logs -f wikijs
|
||||||
```
|
```
|
||||||
|
|
||||||
### Backups
|
### Backups
|
||||||
Critical data should be stored in a secure location like AWS S3 or Google Cloud Storage.
|
Critical data is stored in `/DockerVol/wikijs/data`. Non-critical data should be stored elsewhere for safety.
|
||||||
|
|
||||||
### Restore
|
### Restore
|
||||||
Restore from Docker Swarm by running `./deploy.sh` and then redeploy the service.
|
To restore the service, run `./deploy.sh`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Common Failures
|
## Common Failures
|
||||||
| Failure | Symptom | Cause | Fix |
|
1. **Service Not Responding**: Check the logs for any errors: `docker service logs -f wikijs`
|
||||||
|--------|---------|------|-----|
|
2. **Database Connection Issues**: Verify the database credentials and port.
|
||||||
1. Service not responding to requests | Request timeout error | PostgreSQL connection issues or network downtime | Restart PostgreSQL service.
|
3. **Caddy Configuration Errors**: Ensure Caddy is correctly configured in the environment variables.
|
||||||
2. Caddy reverse proxy configuration errors | Caddy does not forward requests properly | Incorrect Caddy configuration | Update `caddy.yml` file.
|
|
||||||
3. Docker Swarm container deployment fails | Container image cannot be pulled from Docker Hub | Network connectivity issue with Docker Swarm manager node | Update Docker Swarm network configuration.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -106,12 +113,17 @@ Restore from Docker Swarm by running `./deploy.sh` and then redeploy the service
|
||||||
|
|
||||||
| Date | Commit | Summary |
|
| Date | Commit | Summary |
|
||||||
|------|--------|---------|
|
|------|--------|---------|
|
||||||
| 2026-05-01 | 08373d81 | Initial service setup for wiki documentation server. |
|
| 2026-05-02 | 7acd015c | Initial documentation creation |
|
||||||
| 2026-05-01 | 8502d4ea | Fixed Caddy reverse proxy configuration for `wikijs` service. |
|
| 2026-05-01 | 08373d81 | Added database connection logic |
|
||||||
| 2026-05-01 | dae11c17 | Implemented PostgreSQL database management by `wikijs-db`. |
|
| 2026-05-01 | 8502d4ea | Implemented Caddy reverse proxy |
|
||||||
| 2026-05-01 | 94ce222e | Integrated `drawio` drawing server with Caddy reverse proxy. |
|
| 2026-05-01 | dae11c17 | Improved security with environment variable storage |
|
||||||
| 2026-05-01 | 4e40ea86 | Fixed Docker Swarm deployment issues for all services in the wiki stack. |
|
| 2026-05-01 | 94ce222e | Enhanced logging and monitoring capabilities |
|
||||||
|
|
||||||
Generated by Gremlin on 2026-05-02T03:42:38.085Z
|
<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.>
|
||||||
Source: swarm/wiki.yaml
|
|
||||||
Review User Guide and Changelog sections
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- Generated by Gremlin on 2026-05-02T18:45:51.188Z
|
||||||
|
- Source: swarm/wiki.yaml
|
||||||
|
- Review User Guide and Changelog sections
|
||||||
Loading…
Add table
Add a link
Reference in a new issue