2024-04-07 09:04:32 +08:00
include :
2024-11-12 14:59:41 +08:00
- ./docker-compose-base.yml
2025-03-31 16:09:43 +08:00
# 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.
2024-04-07 09:04:32 +08:00
services :
2025-10-23 23:02:27 +08:00
ragflow-cpu :
2024-02-28 15:01:12 +08:00
depends_on :
2024-02-28 18:57:43 +08:00
mysql :
condition : service_healthy
2025-10-23 23:02:27 +08:00
profiles :
- cpu
2024-09-29 18:24:24 +08:00
image : ${RAGFLOW_IMAGE}
2025-05-07 19:40:45 +08:00
# Example configuration to set up an MCP server:
2025-04-21 09:43:20 +08:00
# 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
2025-04-22 10:04:21 +08:00
# - --mcp-mode=self-host
2025-07-30 09:43:29 +08:00
# - --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)
2025-10-13 19:05:54 +08:00
2025-12-08 09:42:10 +08:00
# Example configuration to start Admin server:
2025-10-13 19:05:54 +08:00
# command:
# - --enable-adminserver
2024-02-28 15:01:12 +08:00
ports :
2025-10-28 12:07:42 +08:00
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
2024-02-28 15:01:12 +08:00
- ${SVR_HTTP_PORT}:9380
2025-10-13 19:05:54 +08:00
- ${ADMIN_SVR_HTTP_PORT}:9381
2025-10-28 12:07:42 +08:00
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
2024-02-28 15:01:12 +08:00
volumes :
- ./ragflow-logs:/ragflow/logs
2024-02-29 12:50:01 +08:00
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
2025-03-19 14:22:53 +07:00
- ../history_data_agent:/ragflow/history_data_agent
2025-03-31 16:09:43 +08:00
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
Fix mcp server startup failure (#7329)
### What problem does this PR solve?
0.18.0 mcp server can not start with upgrade from 0.17.2 or new install
except rebuild all docker
Close #7321
mcp server can not start auto from docker :
2025-04-25 17:30:44,512 INFO 25 task_executor_2a9f3e2de99a_0 reported
heartbeat: {"name": "task_executor_2a9f3e2de99a_0", "now":
"2025-04-25T17:30:44.509+08:00", "boot_at":
"2025-04-25T16:43:33.038+08:00", "pending": 0, "lag": 0, "done": 0,
"failed": 0, "current": {}}
usage: server.py [-h] [--base_url BASE_URL] [--host HOST] [--port PORT]
[--mode MODE] [--api_key API_KEY]
server.py: error: unrecognized arguments:
problem:
server.py in docker start arguments not correct , so mcp server start
fail
reason:
```
1. docker-copose.yaml
example - --mcp-host-api-key="ragflow-12345678" is wrong. do not add "" to key or it says:"api-key wrong"
2.docker file entrypoint.sh can not translate config to exec command , we need mapping file from host to docker
- ./entrypoint.sh:/ragflow/entrypoint.sh
3.just add one code raw fix all probelm
```
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Documentation Update
- [x] Performance Improvement
---------
Co-authored-by: Yongteng Lei <yongtengrey@outlook.com>
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2025-04-27 18:47:12 +08:00
- ./entrypoint.sh:/ragflow/entrypoint.sh
2024-11-12 14:59:41 +08:00
env_file : .env
2024-02-28 15:01:12 +08:00
networks :
- ragflow
2025-12-04 15:18:13 +08:00
restart : unless-stopped
2024-11-12 14:59:41 +08:00
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
2025-05-07 19:40:45 +08:00
# 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.
2024-10-23 01:43:21 -07:00
extra_hosts :
- "host.docker.internal:host-gateway"
2025-10-23 23:02:27 +08:00
ragflow-gpu :
depends_on :
mysql :
condition : service_healthy
profiles :
- gpu
image : ${RAGFLOW_IMAGE}
# 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)
2025-12-08 09:42:10 +08:00
# Example configuration to start Admin server:
2025-10-23 23:02:27 +08:00
# command:
# - --enable-adminserver
ports :
2025-10-28 12:07:42 +08:00
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
2025-10-23 23:02:27 +08:00
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
2025-10-28 12:07:42 +08:00
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
2025-10-23 23:02:27 +08:00
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
- ../history_data_agent:/ragflow/history_data_agent
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file : .env
networks :
- ragflow
2025-12-04 15:18:13 +08:00
restart : unless-stopped
2025-10-23 23:02:27 +08:00
# 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]
2025-01-20 22:49:46 +08:00
# executor:
# depends_on:
# mysql:
# condition: service_healthy
# image: ${RAGFLOW_IMAGE}
# volumes:
# - ./ragflow-logs:/ragflow/logs
# - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
# env_file: .env
# entrypoint: "/ragflow/entrypoint_task_executor.sh 1 3"
# networks:
# - ragflow
2025-12-04 15:18:13 +08:00
# restart: unless-stopped
2025-01-20 22:49:46 +08:00
# # https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# # If you're using Docker Desktop, the --add-host flag is optional. This flag makes sure that the host's internal IP gets exposed to the Prometheus container.
# extra_hosts:
# - "host.docker.internal:host-gateway"
2025-10-23 23:02:27 +08:00
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]