1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: '3.8'
services:
# Neo4j Graph Database
# Stores code entities as nodes with relationships (e.g. method calls)
neo4j:
image: neo4j:5
container_name: knot_neo4j
restart: unless-stopped
ports:
- "7474:7474" # Web interface (Neo4j Browser)
- "7687:7687" # Bolt protocol (used by knot via neo4rs)
environment:
# Authentication: username=neo4j, password=knot_secret_password
NEO4J_AUTH: neo4j/knot_secret_password
# Increase memory for better performance on large codebases
NEO4J_server_memory_heap_initial__size: 512m
NEO4J_server_memory_heap_max__size: 2G
# Allow unrestricted access from any IP (safe for local development)
NEO4J_server_default__listen__address: 0.0.0.0
volumes:
# Persist database files on the host machine
# Use KNOT_DATA_DIR to change the storage location (e.g. for cleaning/recreating)
- ${KNOT_DATA_DIR:-./data}/neo4j/data:/data
- ${KNOT_DATA_DIR:-./data}/neo4j/logs:/logs
- ${KNOT_DATA_DIR:-./data}/neo4j/import:/var/lib/neo4j/import
- ${KNOT_DATA_DIR:-./data}/neo4j/plugins:/plugins
healthcheck:
test:
interval: 30s
timeout: 10s
retries: 5
# Qdrant Vector Database
# Stores high-dimensional embeddings of code entities for semantic search
qdrant:
image: qdrant/qdrant:latest
container_name: knot_qdrant
restart: unless-stopped
ports:
- "6333:6333" # REST API (for inspection/debugging)
- "6334:6334" # gRPC API (used by knot via qdrant-client)
volumes:
# Persist vector storage on the host machine
- ${KNOT_DATA_DIR:-./data}/qdrant:/qdrant/storage
environment:
# Optional: configure Qdrant settings
QDRANT__SERVICE__HTTP_PORT: 6333
QDRANT__SERVICE__GRPC_PORT: 6334
healthcheck:
# The qdrant image ships neither wget nor curl, and Qdrant 1.17 no longer
# serves `/health` (`/healthz` is the current endpoint), so probe the
# listening socket directly with bash's /dev/tcp.
test:
interval: 30s
timeout: 10s
retries: 5
networks:
default:
name: knot_network