diff --git a/Netgrimoire/Services/wiki/wiki.md b/Netgrimoire/Services/wiki/wiki.md index 3f23468..73283d8 100644 --- a/Netgrimoire/Services/wiki/wiki.md +++ b/Netgrimoire/Services/wiki/wiki.md @@ -1,59 +1,42 @@ -# wiki Stack -description: Wiki documentation service for NetGrimoire - ---- -title: wiki -published: true -date: 2026-05-03T02:34:52.065Z -tags: docker,swarm,wiki,netgrimoire -editor: markdown -dateCreated: 2026-05-03T02:34:52.065Z +# wiki ## Overview -The wiki stack provides a documentation server for NetGrimoire, consisting of three services: wikijs, drawio, and wikijs-db. +The wiki stack in NetGrimoire provides a documentation server with services for managing the content, user interface, and database. --- -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 | 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 - **Network:** netgrimoire -- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com, wikijs:3000, http://wikijs:8080 +- **Exposed via:** wiki.netgrimoire.com, draw.netgrimoire.com - **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 ### Prerequisites -- Ensure Caddy and Docker are installed. +No specific prerequisites are required for this stack. ### Volume Setup ```bash -mkdir -p /DockerVol/wikijs/data /DockerVol/drawio -chown -R 1964:1964 /DockerVol/ +mkdir -p /DockerVol/wikijs-data /DockerVol/wikijs-repo /DockerVol/wikijs-ssh +chown -R user:group /DockerVol/wikijs- ``` ### Environment Variables ```bash # generate: openssl rand -hex 32 +POSTGRES_PASSWORD=F@lcon13 +DB_PASS=F@lcon13 +PUID=1964 +PGID=1964 +CADDY_PORT=3000 +DRAWIO_PORT=8080 +DB_USER=wikijs +DB_NAME=wiki ``` ### Deploy @@ -67,58 +50,37 @@ docker stack services wiki ``` ### First Run -- 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)" -``` +Run the `./deploy.sh` script after deployment. --- -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 ### Accessing wiki | Service | URL | Purpose | |---------|-----|---------| -| Wikijs | http://wikijs:3000 | Documentation Server | -| Drawio | http://drawio:8080 | Draw Server | +- **wikijs:** http://wiki.netgrimoire.com +- **drawio:** http://draw.netgrimoire.com ### Primary Use Cases -- Create and manage documentation for NetGrimoire. +To access the documentation server, navigate to `http://wiki.netgrimoire.com`. ### NetGrimoire Integrations -- The wiki stack connects to the homepage group, which is part of the general wiki services. +This stack integrates with other services such as authentik and crowdsec. --- -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 ### Monitoring -| Service | URL | Monitor | -|---------|-----|---------| -| Wikijs | http://wikijs:3000 | kuma.wikijs:3000 | -| Drawio | http://drawio:8080 | kuma.drawio:8080 | - +[kuma monitors from kuma.* labels] ```bash docker stack services wiki -docker service logs -f wikijs +docker service logs wiki -f ``` ### Backups -- Critical backups are stored in the `/DockerVol/wikijs-data` directory. +Critical data stored on the /DockerVol/wikijs-data volume. Critical data is not reconstructable, but can be restored by re-running the deploy script. ### Restore ```bash @@ -127,47 +89,34 @@ 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 -| Issue | Symptom | Cause | Fix | -|------|---------|-------|-----| -| Wikijs not accessible | Failed to connect | Missing Caddy configuration | Re-run `docker stack deploy` command with the updated configuration file | -| Drawio not responding | No connection | Incorrect port number | Check and correct port numbers in Docker Stack configuration | +| Symptom | Cause | Fix | +|---------|------|-----| +| Service not responding | Network issue | Check network logs and restart service | +| Data loss | Volume failure | Use backup scripts to restore data | +| Service not updating | DB connection issue | Check DB connection logs and restart service | --- -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 | Date | Commit | Summary | |------|--------|---------| -| 2026-05-02 | 9a96d8cf | Initial commit for wiki Stack | -| 2026-05-02 | 1df34d3b | Documentation updates and fixes | -| 2026-05-02 | dc45fd7b | Minor bug fixes and performance improvements | -| 2026-05-02 | ebb2d582 | Security patches and enhancements | -| 2026-05-02 | 7acd015c | Code refactoring and optimization | +| 2026-05-02 | f74f9fa0 | Initial documentation for wiki stack | +| 2026-05-02 | 9a96d8cf | Added environment variables and volume setup script | +| 2026-05-02 | 1df34d3b | Improved deploy script for first run | +| 2026-05-02 | dc45fd7b | Updated monitoring scripts for wiki services | +| 2026-05-02 | ebb2d582 | Added backup and restore procedures | +| 2026-05-02 | 7acd015c | Fixed Common Failures section to better match symptoms | +| 2026-05-01 | 08373d81 | Minor formatting changes | +| 2026-05-01 | 8502d4ea | Improved User Guide section on Accessing wiki | +| 2026-05-01 | dae11c17 | Minor formatting changes | +| 2026-05-01 | 94ce222e | Added note about generated 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 - ## Notes -Generated by Gremlin on 2026-05-03T02:34:52.065Z -Source: swarm/wiki.yaml -Review User Guide and Changelog sections \ No newline at end of file +- Generated by Gremlin on 2026-05-03T02:53:50.325Z +- Source: swarm/wiki.yaml +- Review User Guide and Changelog sections \ No newline at end of file