Agentic coding guide for this repository.
A self-hosted, AI-enhanced learning platform running on Unraid NAS. Serves offline copies of Wikipedia, Project Gutenberg, Stack Overflow, and 7 other knowledge sources (~356GB total) accessible from any device on the home network via Kiwix.
knowledge-portal/
├── Dockerfile # Thin kiwix-serve wrapper (Alpine base)
├── docker-compose.yml # Two-container orchestration (kiwix + tools)
├── .env # Configuration (paths, ports)
├── .dockerignore
├── .gitignore
├── README.md # Full architecture & operations guide
└── .github/ # CI/CD workflows (GitHub Actions)
Two-container design:
knowledge-portal(kiwix-serve, Alpine): Read-only ZIM server on port 8080 (mapped to 8081)knowledge-portal-tools(Debian Slim, separate repo): Download/update ZIM files
Storage: /mnt/user/knowledge/library/ on Unraid NAS (mounted as /data in containers)
Knowledge sources: Wikipedia, Gutenberg, Stack Overflow, Wiktionary, Wikibooks, Wikiversity, Wikivoyage, Wikiquote, Wikisource, PhET
# Start kiwix server (via docker-compose)
docker compose up -d
# Initial setup (download all sources)
docker run -d --name knowledge-setup \
-v /mnt/user/knowledge/library:/data \
ghcr.io/thetechild/knowledge-portal-tools:latest \
/scripts/setup.sh
# Weekly updates
docker run --rm \
-v /mnt/user/knowledge/library:/data \
ghcr.io/thetechild/knowledge-portal-tools:latest \
/scripts/update.sh
# Restart kiwix to pick up new ZIM files
docker restart kiwix-wikipedia- Separate containers for separate concerns — kiwix-serve (minimal Alpine) vs tools (full Debian)
- Digest-pinned base images in Dockerfile for reproducible builds
- English-only ZIM variants for now (simplifies selection)
- Unraid-managed containers — no docker-compose on NAS itself; use Unraid Docker UI
- GitHub Actions CI/CD — build & push to GHCR on every push to
main - Dependabot monitoring for base images and Actions versions
provenance: falseon build-push-action to avoid GHCR manifest issues with older Docker clients
- Kiwix-serve is Alpine/BusyBox — no bash, no GNU wget/grep. Tools container uses Debian Slim for full GNU tooling.
- No docker-compose on Unraid — containers managed via Unraid's web UI, not CLI
- GHCR authentication — NAS requires classic PAT (
unraid-docker-pull) withread:packagesscope in/root/.docker/config.json - Min free space — Keep 50GB free on Unraid share for staging downloads
- Healthcheck uses wget — Requires wget in container (present in kiwix-serve image)
- Future expansion — Planned: Calibre, Ollama, vector DB, unified frontend, lecture integration