forked from catonmoon/morag
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (136 loc) · 5.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
143 lines (136 loc) · 5.12 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
services:
qdrant:
image: qdrant/qdrant:v1.17.0
ports:
- "6333:6333" # REST API + веб-дашборд: http://localhost:6333/dashboard
- "6334:6334" # gRPC
volumes:
# Bind-mount в локальную папку — каждый клон morag имеет своё хранилище.
# Никакого шаринга через docker named volumes между параллельными деплоями.
- ./volumes/qdrant:/qdrant/storage
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "bash -c 'cat < /dev/null > /dev/tcp/localhost/6333'"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
# docling:
# image: quay.io/docling-project/docling-serve
# ports:
# - "5001:5001"
# command: docling-serve run --host 0.0.0.0 --port 5001 --workers 1 --timeout-keep-alive 600
# restart: unless-stopped
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
# interval: 10s
# timeout: 5s
# retries: 10
# start_period: 120s
morag-indexer:
build:
context: .
network: host
command: serve
extra_hosts:
# Доступ к Ollama на хосте — embedder/LLM могут ходить через host.docker.internal.
- "host.docker.internal:host-gateway"
expose:
# Control-plane HTTP только в docker-network. Console обращается по этому порту.
- "9090"
environment:
# Control-plane HTTP-сервер для приёма команд от console (start/stop/status).
- MORAG_CONTROL_PORT=9090
- MORAG_CONFIG_PATH=/app/conf/config.yml
- MORAG_STATUS_FILE=/app/conf/state/index_status.json
depends_on:
qdrant:
condition: service_healthy
embedder-gte:
condition: service_healthy
volumes:
# conf/ — каталог с config.yml + config.local.yml (overlay UI) + state/.
# Mount директорией, не single-file — Console сам создаёт config.local.yml
# при первой записи. state/ для runtime status indexer'а.
- ./conf:/app/conf:rw
# data: документы для local-source. Local-source в Console UI зашит на /app/data
# без вариаций. Для других папок — править этот mount + path в config.local.yml.
- ./data:/app/data:rw
restart: unless-stopped
morag-console:
build:
context: .
dockerfile: services/console/Dockerfile
network: host
ports:
# Bind ТОЛЬКО на localhost — UI без auth, наружу выставлять опасно.
- "127.0.0.1:8000:8000"
environment:
- MORAG_CONFIG_PATH=/app/conf/config.yml
# HTTP control-plane индексера в docker-network
- MORAG_INDEXER_URL=http://morag-indexer:9090
- QDRANT_DASHBOARD_URL=http://localhost:6333/dashboard
- OPENWEBUI_URL=http://localhost:3000
volumes:
# conf rw — console пишет config.local.yml в эту директорию.
- ./conf:/app/conf:rw
# data ro — console читает /app/data чтобы показать список файлов
# для local-source (см. /api/setup/local-source-files).
- ./data:/app/data:ro
depends_on:
morag-indexer:
condition: service_started
restart: unless-stopped
embedder-gte:
build:
context: services/embedder_gte
network: host
ports:
- "8081:8081"
deploy:
resources:
limits:
memory: 4G
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s
pipelines:
build:
context: .
dockerfile: services/pipeline/Dockerfile
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "9099:9099"
environment:
# Все retrieval-настройки читаются из /app/conf/config.yml (секция retrieval)
# при старте контейнера. Изменения — `docker compose restart pipelines`.
# OWUI Valves остаются как override-механизм (пустое значение = брать из config).
- MORAG_CONFIG_PATH=/app/conf/config.yml
volumes:
- ./conf:/app/conf:rw # bind-mount конфигов (как у indexer/console)
depends_on:
qdrant:
condition: service_healthy
embedder-gte:
condition: service_healthy
restart: unless-stopped
open-webui:
image: ghcr.io/open-webui/open-webui:latest
ports:
- "3000:8080"
environment:
- OPENAI_API_BASE_URL=http://pipelines:9099
- OPENAI_API_KEY=0p3n-w3bu!
- WEBUI_AUTH=False
depends_on:
- pipelines
volumes:
# Bind-mount: чаты, история, settings OWUI — в локальной папке,
# без шаринга через named volumes между параллельными деплоями.
- ./volumes/open-webui:/app/backend/data
restart: unless-stopped