version: '3.8' # RuVector PostgreSQL Testing Environment # Using the official RuVector PostgreSQL extension from ruvnet/ruvector # # Features: # - 77+ SQL functions for vector operations # - HNSW and IVFFlat indexing # - 39 Attention mechanisms (self, multi-head, cross) # - GNN layers for graph operations # - Hyperbolic embeddings (Poincaré/Lorentz) # - Sparse vectors (BM25/TF-IDF) # - SPARQL support (50+ RDF functions) # - Local embeddings (6 fastembed models) # - Self-learning index optimization # - SIMD acceleration (AVX-512/AVX2/NEON) # # Performance: ~61µs latency, 16,400 QPS, 200MB for 1M vectors services: postgres: image: ruvector/postgres:latest container_name: ruvector-postgres environment: POSTGRES_USER: claude POSTGRES_PASSWORD: claude-flow-test POSTGRES_DB: claude_flow # RuVector specific settings RUVECTOR_SIMD: auto # auto-detect best SIMD (AVX-512/AVX2/NEON) RUVECTOR_CACHE_SIZE: 256MB RUVECTOR_LEARN_ENABLED: 'true' ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./scripts/init-db.sql:/docker-entrypoint-initdb.d/01-init.sql healthcheck: test: ["CMD-SHELL", "pg_isready -U claude -d claude_flow"] interval: 5s timeout: 5s retries: 5 # Optimize for vector operations command: > postgres -c shared_preload_libraries='ruvector' -c ruvector.hnsw_ef_search=100 -c ruvector.enable_parallel=on -c work_mem=256MB -c maintenance_work_mem=512MB # Optional: pgAdmin for visual database management pgadmin: image: dpage/pgadmin4:latest container_name: ruvector-pgadmin environment: PGADMIN_DEFAULT_EMAIL: admin@claude-flow.local PGADMIN_DEFAULT_PASSWORD: admin PGADMIN_CONFIG_SERVER_MODE: 'False' ports: - "5050:80" depends_on: postgres: condition: service_healthy profiles: - gui volumes: postgres_data: