2025-05-30 13:10:59 +08:00
2024-04-07 09:04:32 +08:00
include :
2024-11-12 14:59:41 +08:00
- ./docker-compose-base.yml
2024-07-26 10:52:56 +08:00
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 :
2024-02-28 15:01:12 +08:00
ragflow :
depends_on :
2024-02-28 18:57:43 +08:00
mysql :
condition : service_healthy
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-05-07 19:40:45 +08:00
# - --mcp-host-api-key=ragflow-xxxxxxx
2024-02-28 15:01:12 +08:00
container_name : ragflow-server
ports :
- ${SVR_HTTP_PORT}:9380
2024-02-28 18:57:43 +08:00
- 80 : 80
- 443 : 443
2025-03-26 15:34:42 +08:00
- 5678 : 5678
- 5679 : 5679
2025-05-07 19:40:45 +08:00
- 9382 : 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
2025-03-19 14:22:53 +07:00
2024-11-12 14:59:41 +08:00
env_file : .env
2024-03-05 12:08:41 +08:00
environment :
- TZ=${TIMEZONE}
2024-09-23 10:00:44 +08:00
- HF_ENDPOINT=${HF_ENDPOINT}
2024-06-14 10:33:59 +08:00
- MACOS=${MACOS}
2024-02-28 15:01:12 +08:00
networks :
- ragflow
2024-11-12 14:59:41 +08:00
restart : on -failure
# 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-01-20 22:49:46 +08:00
# executor:
# depends_on:
# mysql:
# condition: service_healthy
# image: ${RAGFLOW_IMAGE}
# container_name: ragflow-executor
# volumes:
# - ./ragflow-logs:/ragflow/logs
# - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
# env_file: .env
# environment:
# - TZ=${TIMEZONE}
# - HF_ENDPOINT=${HF_ENDPOINT}
# - MACOS=${MACOS}
# entrypoint: "/ragflow/entrypoint_task_executor.sh 1 3"
# networks:
# - ragflow
# restart: on-failure
# # 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"