-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (81 loc) · 3.17 KB
/
docker-compose.yml
File metadata and controls
87 lines (81 loc) · 3.17 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# ─── Shared environment snippet ───────────────────────────────────────────────
x-pg-env: &pg-env
POSTGRES_HOST: postgres
POSTGRES_PORT: "5432"
POSTGRES_DB: ${POSTGRES_DB:-graphrag}
POSTGRES_USER: ${POSTGRES_USER:-graphrag}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
x-embedding-env: &embedding-env
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-BAAI/bge-m3}
EMBEDDING_DEVICE: ${EMBEDDING_DEVICE:-cpu}
EMBEDDING_BATCH_SIZE: ${EMBEDDING_BATCH_SIZE:-32}
# ─── Services ─────────────────────────────────────────────────────────────────
services:
postgres:
image: ghcr.io/${GITHUB_REPOSITORY:-yourorg/graphrag}/graphrag-postgres:${IMAGE_TAG:-latest}
build:
context: ./docker/postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-graphrag}
POSTGRES_USER: ${POSTGRES_USER:-graphrag}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-graphrag} -d ${POSTGRES_DB:-graphrag}"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
networks:
- internal
watcher:
image: ghcr.io/${GITHUB_REPOSITORY:-yourorg/graphrag}/graphrag-watcher:${IMAGE_TAG:-latest}
build:
context: .
dockerfile: ./docker/watcher/Dockerfile
restart: unless-stopped
environment:
<<: [*pg-env, *embedding-env]
DOCS_PATH: /docs
WATCH_RECURSIVE: ${WATCH_RECURSIVE:-true}
volumes:
- docs_data:/docs
- hf_cache:/home/appuser/.cache/huggingface
depends_on:
postgres:
condition: service_healthy
networks:
- internal
mcp:
image: ghcr.io/${GITHUB_REPOSITORY:-yourorg/graphrag}/graphrag-mcp:${IMAGE_TAG:-latest}
build:
context: .
dockerfile: ./docker/mcp/Dockerfile
restart: unless-stopped
environment:
<<: [*pg-env, *embedding-env]
MCP_HOST: "0.0.0.0"
MCP_PORT: ${MCP_PORT:-8000}
SEARCH_TOP_K: ${SEARCH_TOP_K:-10}
SEARCH_MIN_SCORE: ${SEARCH_MIN_SCORE:-0.0}
ports:
- "${MCP_PORT:-8000}:8000"
volumes:
- hf_cache:/home/appuser/.cache/huggingface
depends_on:
postgres:
condition: service_healthy
networks:
- internal
- external
# ─── Volumes ──────────────────────────────────────────────────────────────────
volumes:
postgres_data:
docs_data:
hf_cache: # persists downloaded HuggingFace model weights across restarts
# ─── Networks ─────────────────────────────────────────────────────────────────
networks:
internal: {} # shared backend network; postgres port not exposed to host
external: {} # mcp is reachable from the host