本地部署 RAGFlow - 修改默认端口

news2025/3/18 16:02:22

本地部署 RAGFlow - 修改默认端口

    • 1. 前提条件
    • 2. 部署 RAGFlow

1. 前提条件

确保 vm.max_map_count 不小于 262144:

如需确认 vm.max_map_count 的大小:

sysctl vm.max_map_count

如果 vm.max_map_count 的值小于 262144,可以进行重置:

# 这里我们设为 262144:
sudo sysctl -w vm.max_map_count=262144

你的改动会在下次系统重启时被重置。如果希望做永久改动,还需要在 /etc/sysctl.conf 文件里把 vm.max_map_count 的值再相应更新一遍:

vm.max_map_count=262144

2. 部署 RAGFlow

克隆仓库:

git clone https://github.com/infiniflow/ragflow.git
cd ragflow/docker

修改默认端口(为了不与Dify和Langfush冲突)和默认镜像地址(解决国内网络访问Docker镜像网站问题),这里使用git diff命令显示修改的地方。

git diff docker/.env
diff --git a/docker/.env b/docker/.env
index 2b0b5b8b..db206212 100644
--- a/docker/.env
+++ b/docker/.env
@@ -40,7 +40,7 @@ INFINITY_HOST=infinity
 # Port to expose Infinity API to the host
 INFINITY_THRIFT_PORT=23817
 INFINITY_HTTP_PORT=23820
-INFINITY_PSQL_PORT=5432
+INFINITY_PSQL_PORT=5434

 # The password for MySQL.
 MYSQL_PASSWORD=infini_rag_flow
@@ -53,13 +53,13 @@ MYSQL_DBNAME=rag_flow
 MYSQL_PORT=5455

 # The hostname where the MinIO service is exposed
-MINIO_HOST=minio
+MINIO_HOST=minio_ragflow
 # The port used to expose the MinIO console interface to the host machine,
 # allowing EXTERNAL access to the web-based console running inside the Docker container.
-MINIO_CONSOLE_PORT=9001
+MINIO_CONSOLE_PORT=9003
 # The port used to expose the MinIO API service to the host machine,
 # allowing EXTERNAL access to the MinIO object storage service running inside the Docker container.
-MINIO_PORT=9000
+MINIO_PORT=9019
 # The username for MinIO.
 # When updated, you must revise the `minio.user` entry in service_conf.yaml accordingly.
 MINIO_USER=rag_flow
@@ -68,10 +68,10 @@ MINIO_USER=rag_flow
 MINIO_PASSWORD=infini_rag_flow

 # The hostname where the Redis service is exposed
-REDIS_HOST=redis
+REDIS_HOST=redis_ragflow
 # The port used to expose the Redis service to the host machine,
 # allowing EXTERNAL access to the Redis service running inside the Docker container.
-REDIS_PORT=6379
+REDIS_PORT=6381
 # The password for Redis.
 REDIS_PASSWORD=infini_rag_flow
git diff docker/docker-compose.yml
diff --git a/docker/.env b/docker/.env
index 2b0b5b8b..db206212 100644
--- a/docker/.env
+++ b/docker/.env
@@ -40,7 +40,7 @@ INFINITY_HOST=infinity
 # Port to expose Infinity API to the host
 INFINITY_THRIFT_PORT=23817
 INFINITY_HTTP_PORT=23820
-INFINITY_PSQL_PORT=5432
+INFINITY_PSQL_PORT=5434

 # The password for MySQL.
 MYSQL_PASSWORD=infini_rag_flow
@@ -53,13 +53,13 @@ MYSQL_DBNAME=rag_flow
 MYSQL_PORT=5455

 # The hostname where the MinIO service is exposed
-MINIO_HOST=minio
+MINIO_HOST=minio_ragflow
 # The port used to expose the MinIO console interface to the host machine,
 # allowing EXTERNAL access to the web-based console running inside the Docker container.
-MINIO_CONSOLE_PORT=9001
+MINIO_CONSOLE_PORT=9003
 # The port used to expose the MinIO API service to the host machine,
 # allowing EXTERNAL access to the MinIO object storage service running inside the Docker container.
-MINIO_PORT=9000
+MINIO_PORT=9019
 # The username for MinIO.
 # When updated, you must revise the `minio.user` entry in service_conf.yaml accordingly.
 MINIO_USER=rag_flow
@@ -68,10 +68,10 @@ MINIO_USER=rag_flow
 MINIO_PASSWORD=infini_rag_flow

 # The hostname where the Redis service is exposed
-REDIS_HOST=redis
+REDIS_HOST=redis_ragflow
 # The port used to expose the Redis service to the host machine,
 # allowing EXTERNAL access to the Redis service running inside the Docker container.
-REDIS_PORT=6379
+REDIS_PORT=6381
 # The password for Redis.
 REDIS_PASSWORD=infini_rag_flow

(base) root@DESKTOP-31CKLQ1:/u01/workspace/ragflow-main/docker# git diff docker-compose.yml
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 676f167d..e7036643 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -6,12 +6,12 @@ services:
     depends_on:
       mysql:
         condition: service_healthy
-    image: ${RAGFLOW_IMAGE}
+    image: docker.1ms.run/${RAGFLOW_IMAGE}
     container_name: ragflow-server
     ports:
       - ${SVR_HTTP_PORT}:9380
-      - 80:80
-      - 443:443
+      - 50080:80
+      - 50443:443
     volumes:
       - ./ragflow-logs:/ragflow/logs
       - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
git diff docker/docker-compose-base.yml
diff --git a/docker/docker-compose-base.yml b/docker/docker-compose-base.yml
index 93804d5a..abf7e9e4 100644
--- a/docker/docker-compose-base.yml
+++ b/docker/docker-compose-base.yml
@@ -3,7 +3,7 @@ services:
     container_name: ragflow-es-01
     profiles:
       - elasticsearch
-    image: elasticsearch:${STACK_VERSION}
+    image: docker.1ms.run/elasticsearch:${STACK_VERSION}
     volumes:
       - esdata01:/usr/share/elasticsearch/data
     ports:
@@ -39,7 +39,7 @@ services:
     container_name: ragflow-infinity
     profiles:
       - infinity
-    image: infiniflow/infinity:v0.6.0-dev3
+    image: docker.1ms.run/infiniflow/infinity:v0.6.0-dev3
     volumes:
       - infinity_data:/var/infinity
       - ./infinity_conf.toml:/infinity_conf.toml
@@ -68,7 +68,7 @@ services:

   mysql:
     # mysql:5.7 linux/arm64 image is unavailable.
-    image: mysql:8.0.39
+    image: docker.1ms.run/mysql:8.0.39
     container_name: ragflow-mysql
     env_file: .env
     environment:
@@ -95,8 +95,8 @@ services:
       retries: 3
     restart: on-failure

-  minio:
-    image: quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Z
+  minio_ragflow:
+    image: docker.1ms.run/minio/minio:RELEASE.2023-12-20T01-00-02Z
     container_name: ragflow-minio
     command: server --console-address ":9001" /data
     ports:
@@ -108,21 +108,21 @@ services:
       - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
       - TZ=${TIMEZONE}
     volumes:
-      - minio_data:/data
+      - minio_ragflow_data:/data
     networks:
       - ragflow
     restart: on-failure

-  redis:
+  redis_ragflow:
     # swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/valkey/valkey:8
-    image: valkey/valkey:8
+    image: docker.1ms.run/valkey/valkey:8
     container_name: ragflow-redis
     command: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lru
     env_file: .env
     ports:
       - ${REDIS_PORT}:6379
     volumes:
-      - redis_data:/data
+      - redis_ragflow_data:/data
     networks:
       - ragflow
     restart: on-failure
@@ -136,9 +136,9 @@ volumes:
     driver: local
   mysql_data:
     driver: local
-  minio_data:
+  minio_ragflow_data:
     driver: local
-  redis_data:
+  redis_ragflow_data:
     driver: local

启动,

docker compose -p ragflow -f docker-compose.yml up -d

一定要指定 -p ragflow,否则和Dify项目冲突,因为他们的docker-compose.yml文件都在docker目录下面。

打开 http://ip:50080 进行访问。

完结!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2317306.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

repo init 错误 Permission denied (publickey)

一、已经生成ssh-key并设置到gerrit上 二、已经设置.gitconfig (此步骤是公司要求,设置gerrit地址为一个别名之类的,有的公司不需要) 然后出现下面的错误,最后发现忘记设置git的用户名和邮箱 1. git config --globa…

TSB - AD 解读 — 迈向可靠、透明的 TSAD 任务

目录 一 文章动机 二 TSAD 领域内的两类缺陷 三 数据集的构建 四 实验结果及结论 项目宣传链接:TSB-AD 代码链接: TheDatumOrg/TSB-AD: TSB-AD: Towards A Reliable Time-Series Anomaly Detection Benchmark 原作者解读:NeurIPS 2…

论文阅读:2023-arxiv Can AI-Generated Text be Reliably Detected?

总目录 大模型安全相关研究:https://blog.csdn.net/WhiffeYF/article/details/142132328 文章目录 Abstract(摘要)1 Introduction(引言)Conclusion(结论) Can AI-Generated Text be Reliably D…

Language Models are Few-Shot Learners,GPT-3详细讲解

GPT的训练范式:预训练Fine-Tuning GPT2的训练范式:预训练Prompt predict (zero-shot learning) GPT3的训练范式:预训练Prompt predict (few-shot learning) GPT2的性能太差,新意高&…

Hoppscotch 开源API 开发工具

Hoppscotch 是一个开源的 API 开发工具,旨在为开发者提供一个轻量级、快速且功能丰富的 API 开发和调试平台。以下是对其主要特性和功能的详细介绍: 1. 轻量级与高效 Hoppscotch 采用简约的 UI 设计,注重易用性和高效性。它支持实时发送请求…

【芯片验证】面试题·对深度为60的数组进行复杂约束的技巧

朋友发给我的芯片验证笔试题,觉得很有意思,和大家分享一下。 面试题目 class A中一个长度为60的随机数组rand int arr[60],如何写约束使得: 1.每个元素的值都在(0,100]之间,且互不相等; 2.最少有三个元素满足勾股数要求,比如数组中包含3,4,5三个点; 请以解约束最快…

Manus “Less structure,More intelligence ”独行云端处理器

根据市场调研机构Statista数据显示,全球的AR/AR的市场规模预计目前将达到2500亿美元,Manus作为VR手套领域的领军企业,足以颠覆你的认知。本篇文章将带你解读Manus产品,针对用户提出的种种问题,Manus又将如何解决且让使…

【再读】R1-Onevision通过跨模态形式化为复杂多模态推理任务提供了系统性解决方案

R1-Onevision:跨模态形式化驱动的多模态推理技术突破,R1-Onevision通过跨模态形式化、双阶段训练和教育级基准测试,为多模态推理树立了新标杆。其技术创新不仅提升了模型在复杂任务中的表现,更重要的是为行业提供了一种可解释、可迁移的多模态处理范式。随着形式化方法的不断…

SSM框架——Spring面试题

Spring常见面试题 Spring框架中的单例bean是线程安全的吗 不是线程安全的 Spring框架中有一个Scope注解,默认的值就是singleton,单例的。 因为一般在spring的bean的中都是注入无状态的对象,没有线程安全问题,如果在bean中定义了可…

云原生大佬重生,记忆逐步复苏(十三:selinux模块)

目录 1:什么是selinux 1.1 SELinux 的作用 1.2. SELinux 的工作原理 1.3. SELinux 的运行模式 2:解析selinux文件上下文标签策略 3:selinux的布尔值 4:调查和解决selinux问题 1:什么是selinux SELinux(Security-Enhanced L…

MySQL高频八股——事务过程中Undo log、Redo log、Binlog的写入顺序(涉及两阶段提交)

大家好,我是钢板兽! 在上一篇文章中,我分别介绍了 Undo Log、Redo Log 和 Binlog 在事务执行过程中的作用与写入机制。然而,实际应用中,这三种日志的写入是有先后顺序的。因此,本篇文章将深入探讨它们的写…

C++进阶——AVL树的实现

1、AVL的概念 1.1 AVL 树的发明 AVL 树由 G.M. Adelson-Velsky 和 E.M. Landis 在 1962 年的论文《An algorithm for the organization of information》中提出。他们的设计目标是解决二叉搜索树在动态操作(插入、删除)中可能退化为链表的问题。 1.2 …

打包当前Ubuntu镜像 制作Ubuntu togo系统

我的系统的基本情况说明: 我原来的系统的具体型号如下: uname -rLinux Engine 5.15.0-134-generic #145~20.04.1-Ubuntu SMP Mon Feb 17 13:27:16 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux我原来的硬盘以及分区策略如下: 可以看到我的分区…

系统架构设计师—案例分析—架构设计

文章目录 经典架构风格对比面向对象架构风格/显示调用风格优点缺点举例 事件驱动的系统/隐式调用风格优点缺点举例 基于规则的系统架构风格优点缺点举例 管道过滤器风格优点缺点举例 仓库风格优点缺点举例 解释器风格优点缺点举例 分层架构风格优点缺点举例 经典架构风格对比 …

基于javaweb的SpringBoot智能相册管理系统图片相册系统设计与实现(源码+文档+部署讲解)

技术范围:SpringBoot、Vue、SSM、HLMT、Jsp、PHP、Nodejs、Python、爬虫、数据可视化、小程序、安卓app、大数据、物联网、机器学习等设计与开发。 主要内容:免费功能设计、开题报告、任务书、中期检查PPT、系统功能实现、代码编写、论文编写和辅导、论…

Android 14 Telephony 网络选择功能介绍

一、总体介绍 (一)功能 手动搜网的流程:用户通过UI触发,调用TelephonyManager的API,比如startNetworkScan,然后这个请求会传递到RIL层,通过AT命令与基带通信,进行网络扫描。结果返回后,经过TelephonyRegistry通知应用层。中间可能涉及IPC,比如Binder通信,因为应用和…

深入解析音频编解码器(Audio CODEC):硬件、接口与驱动开发

音频编解码器(Audio CODEC)是音频处理系统中的核心组件,负责 模拟信号与数字信号的相互转换,广泛应用于 智能音箱、嵌入式系统、消费电子产品 等设备。本篇文章将从 硬件结构、接口解析、驱动开发 和 软件配置 等方面,…

深度学习【迭代梯度下降法求解线性回归】

梯度下降法 梯度下降法是一种常用迭代方法,其目的是让输入向量找到一个合适的迭代方向,使得输出值能达到局部最小值。在拟合线性回归方程时,我们把损失函数视为以参数向量为输入的函数,找到其梯度下降的方向并进行迭代&#xff0…

[Lc14_priority_queue] 最后一块石头重量 | 数据流中的第 K 大元素 | 前K个高频单词 | 数据流的中位数

目录 1.最后一块石头的重量 题解 2.数据流中的第 K 大元素 题解 3.前K个高频单词 题解 代码 ⭕4.数据流的中位数 题解 在C中,使用标准库中的priority_queue,默认情况下它是一个最大堆(即大堆排序),这意味着最…

熔断和降级的区别,具体使用场景有哪些?

熔断与降级的核心区别在于触发条件和应用目标,具体差异及使用场景如下: 一、核心区别 对比维度熔断降级触发原因下游依赖服务故障(如超时、异常率过高)触发系统整体负载过高或流量洪峰管理目标层级框架级保护(无业务优…