Files
portainer-core/stacks/wiki.yml
T
jpmschweitzerandClaude Opus 4.5 e886a2f9ba feat(library): deploy Library infrastructure (Neo4j, Wiki.js, Library Desk API)
Implements The Library system - a knowledge management and HybridRAG platform.

**Stack Files:**
- neo4j.yml: Knowledge graph database with APOC plugin
- wiki.yml: Wiki.js for human-facing dossier management
- library-desk.yml: FastAPI coordination service

**Library Desk Service:**
- FastAPI application following best practices
- Pydantic Settings for configuration management
- Bearer token authentication
- Health monitoring endpoints
- Stub endpoints for future HybridRAG implementation

**Features:**
- All services on docker-dataplane network
- Proper healthchecks for all containers
- Neo4j password validation (alphanumeric only)
- Wiki.js healthcheck fixed for IPv4/IPv6 compatibility
- Python 3.12+ with CVE-checked dependencies
- Minor version locking for stability

**Endpoints:**
- Neo4j Browser: http://192.168.86.149:7474
- Wiki.js: http://192.168.86.149:8088
- Library Desk API: http://192.168.86.149:8089
- API Docs: http://192.168.86.149:8089/docs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 17:35:09 +01:00

98 lines
2.7 KiB
YAML

version: '3.8'
# Library - Wiki.js (Knowledge Wiki)
# Application Layer
# Port: 8088 (HTTP)
# GPU: No
# Storage: PostgreSQL (shared), SSD (uploads)
services:
wiki:
image: ghcr.io/requarks/wiki:2
container_name: wiki
restart: unless-stopped
ports:
- "8088:3000" # HTTP web interface
volumes:
# Uploads and backups on HDD
- /mnt/media/library/wiki:/wiki/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
# Database configuration (PostgreSQL shared)
- DB_TYPE=postgres
- DB_HOST=postgres-shared
- DB_PORT=5432
- DB_NAME=library
- DB_USER=library_user
- DB_PASS=${LIBRARY_DB_PASSWORD}
# Redis cache configuration (DB 2)
- REDIS_HOST=redis-shared
- REDIS_PORT=6379
- REDIS_DB=2
# Application configuration
- WIKI_ADMIN_EMAIL=admin@schweitz.net
- HA_ACTIVE=false
- TZ=${TZ:-Europe/Amsterdam}
networks:
- docker-dataplane
deploy:
resources:
reservations:
memory: 256M
limits:
memory: 1G
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/healthz"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
docker-dataplane:
external: true
name: docker-dataplane
# ⚠️ SECURITY WARNING:
# Set LIBRARY_DB_PASSWORD in environment variables before deploying!
# This should match the password created in PostgreSQL (see DEPLOYMENT.md Phase 1.1)
#
# After Deployment:
# 1. Access http://192.168.86.149:8088
# 2. Complete initial setup wizard:
# - Admin account (use strong password!)
# - Site URL: http://192.168.86.149:8088 or https://library.schweitz.net
# - Telemetry: Optional
# 3. Enable API Access:
# - Administration → API Access
# - Generate New Key → Save to .env.library as WIKIJS_API_KEY
# 4. Configure storage:
# - Administration → Storage
# - Enable Git storage (optional, for version control)
#
# Features:
# - Markdown editing with live preview
# - Cross-dossier linking (wikilinks)
# - Full-text search
# - Version history
# - User authentication and authorization
# - API for Front Desk integration
# - Mind map embedding (via Front Desk)
#
# Integration:
# - Front Desk proxies CRUD operations via Wiki.js API
# - Content changes trigger re-indexing in Qdrant
# - Entity extraction updates Neo4j graph
#
# Backups:
# - Database: Managed by Scheduler (daily, 02:00)
# - Content export: Managed by Scheduler (daily, 02:00)
# - Location: /mnt/media/backups/library/wikijs/
#
# External Access (Optional):
# - Nginx Proxy Manager: library.schweitz.net → library-wiki:3000
# - SSL: Let's Encrypt via NPM