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>
78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
version: '3.8'
|
|
|
|
# Library - Neo4j Knowledge Graph
|
|
# Storage Layer
|
|
# Ports: 7474 (Browser), 7687 (Bolt)
|
|
# GPU: No
|
|
# Storage: SSD (graph database)
|
|
|
|
services:
|
|
neo4j:
|
|
image: neo4j:5-community
|
|
container_name: neo4j
|
|
restart: unless-stopped
|
|
ports:
|
|
- "7474:7474" # Neo4j Browser (web UI)
|
|
- "7687:7687" # Bolt protocol (API)
|
|
volumes:
|
|
# Graph database on SSD for performance
|
|
- /home/jpmschweitzer/docker-data/library-neo4j/data:/data
|
|
- /home/jpmschweitzer/docker-data/library-neo4j/logs:/logs
|
|
- /home/jpmschweitzer/docker-data/library-neo4j/plugins:/plugins
|
|
environment:
|
|
- NEO4J_AUTH=neo4j/${NEO4J_PASSWORD}
|
|
- NEO4J_PLUGINS=["apoc"]
|
|
- NEO4J_dbms_memory_heap_initial__size=512m
|
|
- NEO4J_dbms_memory_heap_max__size=2g
|
|
- NEO4J_dbms_memory_pagecache_size=512m
|
|
- NEO4J_apoc_export_file_enabled=true
|
|
- NEO4J_apoc_import_file_enabled=true
|
|
- NEO4J_apoc_import_file_use__neo4j__config=true
|
|
- TZ=${TZ:-Europe/Amsterdam}
|
|
networks:
|
|
- docker-dataplane
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
memory: 1G
|
|
limits:
|
|
memory: 4G
|
|
healthcheck:
|
|
test: ["CMD", "cypher-shell", "-u", "neo4j", "-p", "${NEO4J_PASSWORD}", "RETURN 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
networks:
|
|
docker-dataplane:
|
|
external: true
|
|
name: docker-dataplane
|
|
|
|
# ⚠️ SECURITY WARNING:
|
|
# Set NEO4J_PASSWORD in environment variables before deploying!
|
|
# Use a strong, unique password.
|
|
#
|
|
# After Deployment:
|
|
# 1. Access Neo4j Browser: http://192.168.86.149:7474
|
|
# 2. Login: neo4j / <NEO4J_PASSWORD>
|
|
# 3. Run schema initialization (see DEPLOYMENT.md Phase 4.1)
|
|
# 4. Install APOC plugin (should auto-install from NEO4J_PLUGINS setting)
|
|
#
|
|
# Features:
|
|
# - Knowledge graph for entities, relationships, versions
|
|
# - APOC procedures for advanced graph operations
|
|
# - Cypher query language for graph traversal
|
|
# - Mind map generation for Wiki.js
|
|
# - Version tracking for documentation
|
|
# - Compatibility relationships between projects
|
|
#
|
|
# Memory Configuration:
|
|
# - Heap: 512MB initial → 2GB max
|
|
# - Page cache: 512MB
|
|
# - Reserved: 1GB, Limit: 4GB
|
|
#
|
|
# Backups:
|
|
# - Managed by Scheduler (weekly, Sunday 03:00)
|
|
# - Location: /mnt/media/backups/library/neo4j/
|