llm-wiki/docker-compose.yml

42 lines
1.6 KiB
YAML

# LLM Wiki — Docker Stack
# Karpathy's pattern for LLM-maintained personal knowledge bases
# https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
#
# Architecture (three layers, see schema/AGENTS.md):
# raw/ — your curated source documents (immutable)
# wiki/ — LLM-generated interlinked markdown pages
# schema/ — AGENTS.md tells your LLM how to maintain the wiki
#
# The mkdocs-material image runs `mkdocs serve` from /docs,
# serving the wiki as a beautiful, searchable website.
#
# Portainer deployment: Web Editor → paste this docker-compose.yml → Deploy.
#
# ⚠️ NOTE: bind mounts use absolute paths (/opt/data/workspace/...)
# because this is an NFS-shared volume between PVE host and NUC.
# Adjust paths if your NUC has a different mount point.
services:
wiki:
image: squidfunk/mkdocs-material:latest
container_name: llm-wiki
restart: unless-stopped
ports:
- "${WIKI_PORT:-8787}:8000" # Host port → mkdocs dev server
volumes:
# Mount the entire project root → /docs (single clean mount)
- /opt/data/workspace/docker/llm-wiki/docs:/docs
- /opt/data/workspace/docker/llm-wiki/schema:/schema
- /opt/data/workspace/docker/llm-wiki/mkdocs.yml:/mkdocs.yml
environment:
- MKDOCS_VERBOSE=true
- MKDOCS_LIVERELOAD=true
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
labels:
- "app=llm-wiki"
- "description=Karpathy's LLM Wiki — persistent knowledge base"