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
services:
knot-server:
image: raultov/knot-server:latest
ports:
- "3000:3000"
environment:
- KNOT_WORKSPACE_DIR=/var/lib/knot/repos
- KNOT_SERVER_QDRANT_URL=http://qdrant:6334
- KNOT_SERVER_NEO4J_URI=bolt://neo4j:7687
- KNOT_NEO4J_USER=neo4j
# Change this password for production deployments
- KNOT_NEO4J_PASSWORD=knotsecret
# SSH agent forwarding — required for passphrase-protected keys (common in corporate environments)
- SSH_AUTH_SOCK=/ssh-agent
volumes:
- knot_workspace:/var/lib/knot/repos
# fastembed model cache: must live inside KNOT_WORKSPACE_DIR (knot-server builds the path as
# $KNOT_WORKSPACE_DIR/fastembed_cache, ignoring any separate KNOT_FASTEMBED_CACHE_DIR variable)
- fastembed_cache:/var/lib/knot/repos/fastembed_cache
- ${KNOT_SSH_KEYS_DIR:-${HOME}/.ssh}:/tmp/ssh_keys:ro
# Forward the host SSH agent so passphrase-protected keys work inside the container
- ${SSH_AUTH_SOCK}:/ssh-agent:ro
# Mount local repos directory at the same path so absolute paths passed to the API work transparently.
# Set KNOT_LOCAL_REPOS_DIR in .env or prefix the command:
# KNOT_LOCAL_REPOS_DIR=/home/user/workspace docker compose up
- ${KNOT_LOCAL_REPOS_DIR:-${HOME}/.knot/empty}:${KNOT_LOCAL_REPOS_DIR:-${HOME}/.knot/empty}:ro
depends_on:
qdrant:
condition: service_started
neo4j:
condition: service_started
qdrant:
image: qdrant/qdrant:v1.16.2
volumes:
- qdrant_data:/qdrant/storage
neo4j:
image: neo4j:5.26-community
environment:
# Keep this in sync with the knot-server password above
- NEO4J_AUTH=neo4j/knotsecret
- NEO4J_PLUGINS=["apoc"]
volumes:
- neo4j_data:/data
volumes:
knot_workspace:
fastembed_cache:
qdrant_data:
neo4j_data: