LightRAG/docker-compose.high-performance.yml
Taddeus a70ba1f75a
Phase 1: LightRAG Minimal Helm chart and documentation indexing using url references (#2)
* Partial implementation of phase-0

* Partial implementation of phase-1

* add report

* add postgress

* Revert "add postgress"

This reverts commit 27778dc6bb3906b5220dd386e47fe32ca7415332.

* remove junk

* Cleaned up annd setup docs

* update docs

* moved report

* Updated load_markdown_files function: Now returns tuples with (content, title, relative_path) instead of just (content, title)

* fixes to load docs script and more env variables for llm configuration

* update prod values

* update docs

* apolo docs support with linking

* update docs to reflect url conventions and mapping with docs

* Adds ingress and forwardAuth configurations

Adds ingress configuration to expose the application.

Adds forwardAuth configuration to enable user authentication.

Includes middleware to strip headers.

* Adds ingress and forward authentication middleware support
2025-06-23 20:04:34 +03:00

199 lines
No EOL
5.1 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