当前位置: 首页 > ops >正文

Docker 安装 RAGFlow保姆教程

前提条件

  1. Ubuntu 服务器(20.04 或 22.04 LTS 推荐)
  2. 已安装 DockerDocker Compose
    • 如果尚未安装,请先运行以下命令:
      # 安装 Docker
      curl -fsSL https://get.docker.com -o get-docker.sh
      sudo sh get-docker.sh
      # 将当前用户加入 docker 组,避免每次都要 sudo
      sudo usermod -aG docker $USER
      newgrp docker # 刷新组权限,或重新登录服务器生效# 安装 Docker Compose 插件
      sudo apt-get update
      sudo apt-get install docker-compose-plugin
      # 验证安装
      docker compose version
      
  3. 确保服务器端口 808010 未被其他程序占用。RAGFlow 默认使用这些端口。

安装步骤

第 1 步:下载部署文件

首先,创建一个项目目录并进入,然后从 GitHub 拉取 RAGFlow 的 Docker Compose 配置文件。

# 创建并进入一个目录,例如 ragflow
mkdir ragflow && cd ragflow# 从 GitHub 拉取 RAGFlow 的 Docker Compose 配置文件
git clone https://github.com/infiniflow/ragflow.git
第 2 步:修改RAGFlow配置

RAGFlow依赖组件包括Mysql、Redis、MinIO、Nginx等,因为我的服务之前已安装过这些组件,防止端口冲突,影响RAGFlow启动。

  • 修改docker-compose.yml中nginx的端口从80修改成8580,443修改成8443

注意:原则不在配置这个 docker-compose.yml直接修改端口号,正确的做法应该是修改环境变量

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:depends_on:mysql:condition: service_healthyimage: ${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)container_name: ragflow-serverports:- ${SVR_HTTP_PORT}:9380- 8580:80  #修改1- 8443:443 #修改2- 5678:5678 - 5679:5679- 9382: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- ../history_data_agent:/ragflow/history_data_agent- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template- ./entrypoint.sh:/ragflow/entrypoint.shenv_file: .envenvironment:- TZ=${TIMEZONE}- HF_ENDPOINT=$
http://www.xdnf.cn/news/19697.html

相关文章:

  • 【大前端】React 使用 Redux 实现组件通信的 Demo 示例
  • Vue 评论组件设计 V1.0
  • JVM 的 C1/C2 编译器
  • AI在金融、医疗、教育、制造业等领域的落地案例(含代码、流程图、Prompt示例与图表)
  • Archlinux KDE 下 Fcitx5 输入法的配置与美化
  • 第二十章 ESP32S3 IIC_EEPROM 实验
  • 【计算机网络】TCP状态转移
  • 开发板直连电脑的搭建网络环境(以正点原子阿尔法imx6ull开发板为讲解)
  • Flutter代码生成:告别重复劳动,效率飙升
  • 《我是如何用C语言写工控系统的漏洞和Bug》连载(1)内容大纲
  • FART 自动化脱壳框架优化实战:Bug 修复与代码改进记录
  • 充电枪结构设计-经验总结
  • 计算机网络:概述层---TCP/IP参考模型
  • shell编程从0基础--进阶 1
  • Day20_【机器学习—逻辑回归 (1)—原理】
  • 电子病历空缺句的语言学特征描述与自动分类探析(以GPT-5为例)(上)
  • 找Jenkins代替工具,可以体验下这款国产开源CICD工具
  • Web 集群高可用全方案:Keepalived+LVS (DR) 负载均衡 + Apache 服务 + NFS 共享存储搭建指南
  • 【C++】深入浅出:string类模拟实现全解析
  • 碰一下可打开小程序,在web系统中如何嵌入将小程序写入NFC
  • 企业文档安全守护者全面测评:7款加密软件深度解析,让商业机密固若金汤
  • Parasoft C/C++test案例:基于CERT/CWE的代码合规自动化
  • 力扣hot100:螺旋矩阵(边界压缩,方向模拟)(54)
  • Canaan 阿瓦隆 A1246I 81T矿机评测:性能、功耗与能效全面分析
  • 高效对象属性复制工具
  • 2025 年行政岗转型突破:解锁技能提升新方向
  • 【V8引擎】介绍
  • 基因表达数据的K-M生存曲线的数据处理及绘制
  • C++条件变量学习
  • UML状态图之trigger(触发器)、guard(守卫条件)和action(动作)