forked from infiniflow/ragflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
178 lines (174 loc) · 6.98 KB
/
docker-compose.yml
File metadata and controls
178 lines (174 loc) · 6.98 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
include:
- ./docker-compose-base.yml
# To ensure that the container processes the locally modified `service_conf.yaml.template` instead of the one included in its image, you need to mount the local `service_conf.yaml.template` to the container.
services:
ragflow-cpu:
depends_on:
mysql:
condition: service_healthy
mem_limit: ${ES_MEM_LIMIT}
ulimits:
memlock:
soft: -1
hard: -1
profiles:
- cpu
# For pre-built images (default):
image: ${RAGFLOW_IMAGE}
# For local builds with custom extras, uncomment:
# build:
# context: ..
# dockerfile: Dockerfile
# args:
# RAGFLOW_EXTRAS: ${RAGFLOW_EXTRAS:-all}
# NEED_MIRROR: ${NEED_MIRROR:-0}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-<flag>.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
- ../deepdoc:/ragflow/deepdoc
- ragflow-deps:/opt/ragflow/.deps
- ragflow-cache:/root/.cache/pip
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
ragflow-gpu:
depends_on:
mysql:
condition: service_healthy
profiles:
- gpu
# For pre-built images (default):
image: ${RAGFLOW_IMAGE}
# For local builds with custom extras, uncomment:
# build:
# context: ..
# dockerfile: Dockerfile
# args:
# RAGFLOW_EXTRAS: ${RAGFLOW_EXTRAS:-all}
# NEED_MIRROR: ${NEED_MIRROR:-0}
# Example configuration to set up an MCP server:
# command:
# - --enable-mcpserver
# - --mcp-host=0.0.0.0
# - --mcp-port=9382
# - --mcp-base-url=http://127.0.0.1:9380
# - --mcp-script-path=/ragflow/mcp/server/server.py
# - --mcp-mode=self-host
# - --mcp-host-api-key=ragflow-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional transport flags for MCP (customize if needed).
# Host mode need to combined with --no-transport-streamable-http-enabled flag, namely, host+streamable-http is not supported yet.
# The following are enabled by default unless explicitly disabled with --no-<flag>.
# - --no-transport-sse-enabled # Disable legacy SSE endpoints (/sse and /messages/)
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
# Example configuration to start Admin server:
command:
- --enable-adminserver
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
volumes:
- ./ragflow-logs:/ragflow/logs
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
- ../deepdoc:/ragflow/deepdoc
- ragflow-deps:/opt/ragflow/.deps
- ragflow-cache:/root/.cache/pip
env_file: .env
networks:
- ragflow
restart: unless-stopped
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]
docling:
image: ${DOCLING_IMAGE}
container_name: ragflow-docling
ports:
- "${DOCLING_PORT}:5001"
environment:
- PORT=${DOCLING_PORT}
- DOCLING_SERVE_ENABLE_UI=${DOCLING_SERVE_ENABLE_UI}
- DOCLING_SERVE_ALLOW_DOWNLOADS=${DOCLING_SERVE_ALLOW_DOWNLOADS}
- DOCLING_SERVE_IMAGE_TO_TEXT_MODEL=${DOCLING_SERVE_IMAGE_TO_TEXT_MODEL}
- DOCLING_SERVE_PICTURE_CLASSIFICATION_MODEL=${DOCLING_SERVE_PICTURE_CLASSIFICATION_MODEL}
- PUID=${PUID:-99}
- PGID=${PGID:-100}
- XDG_CACHE_HOME=/app/models/docling
- EASYOCR_MODULE_PATH=/app/models/easyocr
- HF_HOME=/app/models/huggingface
# - TESSDATA_PREFIX=/app/models/tesseract/ # Commented out for safety
- XDG_DATA_HOME=/app/models/.local/share
volumes:
- ${MODELS_PATH:-./models}:/app/models
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:5001/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
mem_limit: ${DOCLING_MEM_LIMIT}
labels:
- net.unraid.docker.icon="https://raw.githubusercontent.com/DS4SD/docling/main/docs/assets/logo.png"
- net.unraid.docker.webui="http://[IP]:${DOCLING_PORT}"
- net.unraid.docker.shell="/bin/sh"
profiles:
- docling
networks:
- ragflow
restart: unless-stopped
# Uncomment for GPU support:
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [ gpu ]