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

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.dtcms.com/a/364934.html

相关文章:

  • 开源 + 免费!谷歌推出 Gemini CLI,Claude Code 的强劲对手
  • UnityWebRequest 数据获取和提交
  • 深度学习-----简单入门卷积神经网络CNN的全流程
  • 异常处理小妙招——3.构造函数的安全第一原则:为什么不在构造函数中抛出异常?
  • Python爬虫实战:研究Pie and polar charts模块,构建电商数据采集和分析系统
  • 揭秘设计模式:优雅地为复杂对象结构增添新功能-访问者模式
  • 给你的应用穿上“外衣”:React中的CSS方案对比与实践
  • 【Linux】线程封装
  • 组长跟我说,她招人看重的是数据分析能力
  • 基于数据挖掘的当代不孕症医案证治规律研究
  • 从0 死磕全栈第3天:React Router (Vite + React + TS 版):构建小时站实战指南
  • 什么是 Java 的反射机制?它有什么优缺点?
  • 20250903的学习笔记
  • 百度发布Comate AI IDE,我要把Cursor卸载了!
  • 机器学习从入门到精通 - 逻辑回归为什么是分类之王?深入决策边界与概率校准
  • 《嵌入式硬件(一):裸机概念与80c51单片机基础》
  • “十五五”国家科技创新规划-建议
  • 百度智能云「智能集锦」自动生成短剧解说,三步实现专业级素材生产
  • Netty + WebSocket:搭建快速且稳定的双向通信通道
  • word文档中从某一页开始页码全是1
  • Wpf程序屏幕居中问题修复全记录
  • 39.Ansible: 包含与导入
  • FastVLM:高效视觉编码助力视觉语言模型突破高分辨率效率瓶颈
  • 独家|字节Seed部门增发百万期权,大模型战线开启“锁人”模式
  • 【golang长途旅行第37站】Redis连接池
  • MMD动画(一)模型、动作、音乐导入
  • 【大前端】React 父子组件通信、子父通信、以及兄弟(同级)组件通信
  • 科技赋能田园:数字化解决方案开启智慧农业新篇章
  • centos9 docker启动不起来,docker启动发生堵塞问题!
  • 【明道云】[工作表控件5] 手机控件的格式化处理