diff --git a/Netgrimoire/Services/wiki/wiki.md b/Netgrimoire/Services/wiki/wiki.md index 4ffa911..e59085d 100644 --- a/Netgrimoire/Services/wiki/wiki.md +++ b/Netgrimoire/Services/wiki/wiki.md @@ -1,13 +1,24 @@ +--- +title: wiki Stack +description: NetGrimoire Wiki Stack +published: true +date: 2026-05-01T20:45:19.316Z +tags: docker,swarm,wiki,netgrimoire +editor: markdown +dateCreated: 2026-05-01T20:45:19.316Z + +--- + # wiki ## Overview -This stack provides a WikiJS instance in NetGrimoire, utilizing Docker Swarm for deployment. It includes services for the WikiJS application, as well as Caddy and Kuma for reverse proxying and monitoring. +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. --- ## Architecture | Service | Image | Port | Role | -|---------|-------|------|-----| +|---------|-----|-----|-------| - **Host:** docker4 - **Network:** netgrimoire - **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com @@ -18,20 +29,27 @@ This stack provides a WikiJS instance in NetGrimoire, utilizing Docker Swarm for ## Build & Configuration ### Prerequisites -Before deploying the wiki stack, ensure Docker Swarm and required dependencies are installed. +None specified. ### Volume Setup ```bash -mkdir -p /DockerVol/wikijs/data /DockerVol/wikijs/repo /DockerVol/wikijs/ssh -chown -R 1964:1964 /DockerVol/wikijs/data +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 -generate: openssl rand -hex 32 -POSTGRES_PASSWORD=F@lcon13 -DB_NAME=wiki +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 ``` ### Deploy @@ -45,7 +63,7 @@ docker stack services wiki ``` ### First Run -Upon deployment, ensure the Caddy and Kuma configurations are correct to allow access to the wiki. +Run `./deploy.sh` to initialize the Stack. --- @@ -54,44 +72,38 @@ Upon deployment, ensure the Caddy and Kuma configurations are correct to allow a ### Accessing wiki | Service | URL | Purpose | |---------|-----|---------| -- **WikiJS:** http://wikijs:3000 | Wiki content management and documentation repository -- **Drawio:** https://draw.io:8080 | Diagramming tool for NetGrimoire services documentation +- **wikijs**: https://wiki.netgrimoire.com +- **drawio**: https://draw.netgrimoire.com ### Primary Use Cases -This stack is used to store the wiki content of NetGrimoire. +Use the Wiki application to document NetGrimoire components and services. ### NetGrimoire Integrations -The Drawio service integrates with other services in NetGrimoire, such as the homepage, which uses it for its diagrammatic structure. The Caddy reverse proxy allows access to the wiki through `wiki.netgrimoire.com` or `draw.netgrimoire.com`. +The wiki Stack integrates with other NetGrimoire services, such as authentication (`authentik`) and monitoring (`kuma.*`). --- ## Operations ### Monitoring -Kuma monitors for services. ```bash docker stack services wiki -docker service logs -f wikijs:3000 +docker service logs -f wikijs 8080 ``` ### Backups -Critical services are stored in /DockerVol/wikijs/data, while reconstructable data is found in /DockerVol/wikijs/repo. +Critical services require regular backups. The `wikijs-db` service uses PostgreSQL's built-in backup functionality. ### Restore -Restore the services from backups or source code. -```bash -cd services/swarm/stack/wiki -./deploy.sh -``` +Run `./deploy.sh` to restore the Stack from a previous version. --- ## Common Failures -| Symptom | Cause | Fix | -|---------|-------|-----| -| Failed deployment | Insufficient network connectivity | Verify netgrimoire overlay is correctly configured. | -| Wiki content not syncing | Missing Caddy configuration | Ensure caddy labels are correct and reverse proxy is enabled. | -| Services not running | Inactive Docker Swarm stack | Run `docker stack deploy --compose-file wiki-stack.yml` and verify services start. | +| 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. | --- @@ -99,17 +111,15 @@ cd services/swarm/stack/wiki | Date | Commit | Summary | |------|--------|---------| -| 2026-05-01 | 4e40ea86 | Initial documentation for the wiki Stack | -| 2026-05-01 | 2b770611 | Updated Docker Swarm configuration to optimize performance | -| 2026-05-01 | 95df17bf | Fixed issues with reverse proxying in Caddy | -| 2026-05-01 | c3b0c0f5 | Improved monitoring and logging for services | -| 2026-02-10 | e6ffa042 | Initial commit of wiki Stack documentation | - - +| 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. | --- ## Notes -- Generated by Gremlin on 2026-05-01T20:42:28.486Z -- Source: swarm/wiki.yaml -- Review User Guide and Changelog sections \ No newline at end of file +Generated by Gremlin on 2026-05-01T20:45:19.316Z +Source: swarm/wiki.yaml +Review User Guide and Changelog sections \ No newline at end of file