diff --git a/Netgrimoire/Services/wiki/wiki.md b/Netgrimoire/Services/wiki/wiki.md index b7442b7..54ba1ef 100644 --- a/Netgrimoire/Services/wiki/wiki.md +++ b/Netgrimoire/Services/wiki/wiki.md @@ -1,133 +1,27 @@ --- title: wiki Stack -description: Wiki.js service in NetGrimoire +description: Documentation Server for NetGrimoire published: true -date: 2026-05-01T20:48:11.580Z +date: 2026-05-02T03:17:49.524Z tags: docker,swarm,wiki,netgrimoire editor: markdown -dateCreated: 2026-05-01T20:48:11.580Z - +dateCreated: 2026-05-02T03:17:49.524Z --- -## wiki +# wiki ## Overview -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. - ---- +The wiki Stack is a Docker Swarm-based service in NetGrimoire that provides a documentation server for the community. It consists of three primary services: wikijs, drawio, and wikijs-db. ## Architecture | Service | Image | Port | Role | -|---------|-----|-----|-----| -- **wikijs** | requarks/wiki:2 | 3000 | Documentation Server | -| | | | | -- **wikijs-db** | postgres:16-alpine | 8080 | Database | -| | | | | -- **drawio** | jgraph/drawio:latest | 8080 | Collaborative Diagrams | +|---------|-----|-----|------| +- **wikijs** | requarks/wiki:2 | 3000 | Documentation Server +- **drawio** | jgraph/drawio:latest | 8080 | Draw Server +- **wikijs-db** | postgres:16-alpine | - | Database -Exposed via: `caddy://wiki.netgrimoire.com` (Caddy reverse proxy) -Homepage group: Documentation -Exposed to Internal Only +Exposed via: +- wiki.netgrimoire.com (Caddy reverse proxy for wikijs) +- draw.netgrimoire.com (Caddy reverse proxy for drawio) ---- - -## Build & Configuration - -### Prerequisites -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 -``` - -### Environment Variables -```bash -PUID="1964" -PGID="1964" -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 -```bash -cd services/swarm/stack/wiki -set -a && source .env && set +a -docker stack config --compose-file wiki-stack.yml > resolved.yml -docker stack deploy --compose-file resolved.yml wiki -rm resolved.yml -docker stack services wiki -``` - -### First Run -Run `./deploy.sh` after deployment to initialize the databases and populate the Wiki.js with initial content. - ---- - -## User Guide - -### Accessing wiki -| Service | URL | Purpose | -|---------|-----|---------| -- **wikijs** | https://wiki.netgrimoire.com | Documentation Server | -| | | | | - -### Primary Use Cases -The primary use case for this service is to provide a documentation server for the NetGrimoire community. - -### NetGrimoire Integrations -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 - -``` - -### Backups -Critical data should be backed up regularly to prevent loss in case of a disaster. Non-critical data can be reconstructed from backups. - -### Restore -```bash -cd services/swarm/stack/wiki -./deploy.sh -``` - ---- - -## Common Failures -| 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. | - ---- - -## Changelog - -| Date | Commit | Summary | -|------|--------|---------| -| 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:48:11.580Z. -Source: swarm/wiki.yaml. -Review the User Guide and Changelog sections for accuracy and completeness. \ No newline at end of file +Homepage group: Documentation \ No newline at end of file