hp_chatbot/docker-compose.yml
michael 5554aa043f Add GraphRAG startup optimization: triple caching and background init
- Cache extracted triples to disk (neo4j_triples.pickle) so Neo4j can be
  repopulated without expensive LLM re-extraction on cold starts
- Split initialization into two phases: fast vector-only (~1-2 min) and
  background GraphRAG, so the server serves requests while GraphRAG loads
- Add GraphRAG status flags to shared_state for monitoring readiness
- Update /status endpoint to expose graphrag_ready/initializing/error
- Restructure main.py to use single event loop for background task support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-23 17:45:05 -06:00

22 lines
877 B
YAML

# IMPORTANT: Neo4j data persists in a Docker named volume (hp_neo4j_data).
# This survives `docker-compose down` and `docker-compose up -d` restarts.
# However, if you delete the volume (docker volume rm hp_neo4j_data), all graph
# data (extracted triples, entities, relationships) will be lost and must be
# re-extracted via LLM calls (10-20+ minutes) or restored from the disk cache
# at index_storage/graphrag_cache/neo4j_triples.pickle.
services:
neo4j:
image: neo4j:5
container_name: hp-neo4j
restart: unless-stopped
ports:
- "7688:7687" # Bolt protocol (mapped to 7688 to avoid conflict with other Neo4j instances)
- "7475:7474" # Browser UI (mapped to 7475 to avoid conflict)
environment:
NEO4J_AUTH: neo4j/hp-graphrag-2024
NEO4J_PLUGINS: '["apoc"]'
volumes:
- hp_neo4j_data:/data
volumes:
hp_neo4j_data: