Removes trailing whitespace and fixes minor formatting issues in Kubernetes deployment docs, storage report, and Helm chart files. Standardizes indentation and spacing in Docker Compose and deployment shell scripts to improve readability and maintainability. These edits improve documentation clarity and make deployment scripts more robust without altering functionality. Relates to MLO-469
199 lines
5 KiB
YAML
199 lines
5 KiB
YAML
version: '3.8'
|
|
|
|
# Production High-Performance Stack
|
|
# Neo4j + Milvus + Redis + PostgreSQL
|
|
# Best for: Large-scale production, complex graph analytics
|
|
|
|
services:
|
|
# LightRAG Application
|
|
lightrag:
|
|
image: ghcr.io/hkuds/lightrag:latest
|
|
container_name: lightrag-hp
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
# High-Performance Storage Configuration
|
|
LIGHTRAG_GRAPH_STORAGE: Neo4JStorage
|
|
LIGHTRAG_VECTOR_STORAGE: MilvusVectorDBStorage
|
|
LIGHTRAG_KV_STORAGE: RedisKVStorage
|
|
LIGHTRAG_DOC_STATUS_STORAGE: PGDocStatusStorage
|
|
|
|
# Service Connection Details
|
|
NEO4J_URI: bolt://neo4j:7687
|
|
NEO4J_USERNAME: neo4j
|
|
NEO4J_PASSWORD: lightrag_neo4j_pass
|
|
|
|
MILVUS_URI: http://milvus-standalone:19530
|
|
MILVUS_DB_NAME: lightrag
|
|
|
|
REDIS_URI: redis://redis:6379
|
|
|
|
POSTGRES_HOST: postgres
|
|
POSTGRES_PORT: 5432
|
|
POSTGRES_USER: lightrag_user
|
|
POSTGRES_PASSWORD: lightrag_pass
|
|
POSTGRES_DATABASE: lightrag
|
|
|
|
# Performance optimizations
|
|
MAX_ASYNC: 8
|
|
MAX_TOKENS: 32768
|
|
ENABLE_LLM_CACHE: true
|
|
ENABLE_LLM_CACHE_FOR_EXTRACT: true
|
|
ports:
|
|
- "9621:9621"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
neo4j:
|
|
condition: service_started
|
|
milvus-standalone:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./data/inputs:/app/inputs
|
|
- ./data/rag_storage:/app/rag_storage
|
|
networks:
|
|
- lightrag-hp-network
|
|
restart: unless-stopped
|
|
|
|
# PostgreSQL for Document Status Storage
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: lightrag-hp-postgres
|
|
environment:
|
|
POSTGRES_DB: lightrag
|
|
POSTGRES_USER: lightrag_user
|
|
POSTGRES_PASSWORD: lightrag_pass
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF-8"
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U lightrag_user -d lightrag"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- lightrag-hp-network
|
|
restart: unless-stopped
|
|
|
|
# Redis for KV Storage
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: lightrag-hp-redis
|
|
command: redis-server --appendonly yes --maxmemory 2gb --maxmemory-policy allkeys-lru
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- lightrag-hp-network
|
|
restart: unless-stopped
|
|
|
|
# Neo4j for Graph Storage
|
|
neo4j:
|
|
image: neo4j:5.15
|
|
container_name: lightrag-hp-neo4j
|
|
environment:
|
|
NEO4J_AUTH: neo4j/lightrag_neo4j_pass
|
|
NEO4J_PLUGINS: '["apoc"]'
|
|
NEO4J_dbms_security_procedures_unrestricted: apoc.*
|
|
NEO4J_dbms_memory_heap_initial__size: 1G
|
|
NEO4J_dbms_memory_heap_max__size: 2G
|
|
NEO4J_dbms_memory_pagecache_size: 1G
|
|
ports:
|
|
- "7474:7474"
|
|
- "7687:7687"
|
|
volumes:
|
|
- neo4j_data:/data
|
|
- neo4j_logs:/logs
|
|
networks:
|
|
- lightrag-hp-network
|
|
restart: unless-stopped
|
|
|
|
# Milvus Dependencies
|
|
etcd:
|
|
image: quay.io/coreos/etcd:v3.5.5
|
|
container_name: lightrag-hp-milvus-etcd
|
|
environment:
|
|
- ETCD_AUTO_COMPACTION_MODE=revision
|
|
- ETCD_AUTO_COMPACTION_RETENTION=1000
|
|
- ETCD_QUOTA_BACKEND_BYTES=4294967296
|
|
- ETCD_SNAPSHOT_COUNT=50000
|
|
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
|
|
volumes:
|
|
- etcd_data:/etcd
|
|
healthcheck:
|
|
test: ["CMD", "etcdctl", "endpoint", "health"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
networks:
|
|
- lightrag-hp-network
|
|
restart: unless-stopped
|
|
|
|
minio:
|
|
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
|
|
container_name: lightrag-hp-milvus-minio
|
|
environment:
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
MINIO_SECRET_KEY: minioadmin
|
|
command: minio server /minio_data --console-address ":9001"
|
|
volumes:
|
|
- minio_data:/minio_data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
networks:
|
|
- lightrag-hp-network
|
|
restart: unless-stopped
|
|
|
|
# Milvus Vector Database
|
|
milvus-standalone:
|
|
image: milvusdb/milvus:v2.3.10
|
|
container_name: lightrag-hp-milvus
|
|
command: ["milvus", "run", "standalone"]
|
|
environment:
|
|
ETCD_ENDPOINTS: etcd:2379
|
|
MINIO_ADDRESS: minio:9000
|
|
volumes:
|
|
- milvus_data:/var/lib/milvus
|
|
ports:
|
|
- "19530:19530"
|
|
- "9091:9091"
|
|
depends_on:
|
|
etcd:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
|
|
interval: 30s
|
|
start_period: 90s
|
|
timeout: 20s
|
|
retries: 3
|
|
networks:
|
|
- lightrag-hp-network
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
neo4j_data:
|
|
neo4j_logs:
|
|
etcd_data:
|
|
minio_data:
|
|
milvus_data:
|
|
|
|
networks:
|
|
lightrag-hp-network:
|
|
driver: bridge
|