1、从github上下载
https://github.com/infiniflow/ragflow.git
2、修改 .env文件 ,把端口冲突的改掉
文件内容如下
# The type of doc engine to use.
# Available options:
# - `elasticsearch` (default)
# - `infinity` (https://github.com/infiniflow/infinity)
DOC_ENGINE=${DOC_ENGINE:-elasticsearch}# ------------------------------
# docker env var for specifying vector db type at startup
# (based on the vector db type, the corresponding docker
# compose profile will be used)
# ------------------------------
COMPOSE_PROFILES=${DOC_ENGINE}# The version of Elasticsearch.
STACK_VERSION=8.11.3# The hostname where the Elasticsearch service is exposed
ES_HOST=es01# The port used to expose the Elasticsearch service to the host machine,
# allowing EXTERNAL access to the service running inside the Docker container.
ES_PORT=11200# The password for Elasticsearch.
ELASTIC_PASSWORD=infini_rag_flow# The port used to expose the Kibana service to the host machine,
# allowing EXTERNAL access to the service running inside the Docker container.
KIBANA_PORT=6601
KIBANA_USER=rag_flow
KIBANA_PASSWORD=infini_rag_flow# The maximum amount of the memory, in bytes, that a specific Docker container can use while running.
# Update it according to the available memory in the host machine.
MEM_LIMIT=8073741824# The hostname where the Infinity service is exposed
INFINITY_HOST=infinity# Port to expose Infinity API to the host
INFINITY_THRIFT_PORT=23817
INFINITY_HTTP_PORT=23820
INFINITY_PSQL_PORT=54321# The password for MySQL.
MYSQL_PASSWORD=infini_rag_flow
# The hostname where the MySQL service is exposed
MYSQL_HOST=mysql
# The database of the MySQL service to use
MYSQL_DBNAME=rag_flow
# The port used to expose the MySQL service to the host machine,
# allowing EXTERNAL access to the MySQL database running inside the Docker container.
MYSQL_PORT=55455# The hostname where the MinIO service is exposed
MINIO_HOST=minio
# 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=29001
# 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=29000
# The username for MinIO.
# When updated, you must revise the `minio.user` entry in service_conf.yaml accordingly.
MINIO_USER=rag_flow
# The password for MinIO.
# When updated, you must revise the `minio.password` entry in service_conf.yaml accordingly.
MINIO_PASSWORD=infini_rag_flow# The hostname where the Redis service is exposed
REDIS_HOST=redis
# 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=26379
# The password for Redis.
REDIS_PASSWORD=infini_rag_flow# The port used to expose RAGFlow's HTTP API service to the host machine,
# allowing EXTERNAL access to the service running inside the Docker container.
SVR_HTTP_PORT=29380# The RAGFlow Docker image to download.
# Defaults to the v0.16.0-slim edition, which is the RAGFlow Docker image without embedding models.
RAGFLOW_IMAGE=infiniflow/ragflow:v0.16.0-slim
#
# To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
# RAGFLOW_IMAGE=infiniflow/ragflow:v0.16.0
#
# The Docker image of the v0.16.0 edition includes:
# - Built-in embedding models:
# - BAAI/bge-large-zh-v1.5
# - BAAI/bge-reranker-v2-m3
# - maidalun1020/bce-embedding-base_v1
# - maidalun1020/bce-reranker-base_v1
# - Embedding models that will be downloaded once you select them in the RAGFlow UI:
# - BAAI/bge-base-en-v1.5
# - BAAI/bge-large-en-v1.5
# - BAAI/bge-small-en-v1.5
# - BAAI/bge-small-zh-v1.5
# - jinaai/jina-embeddings-v2-base-en
# - jinaai/jina-embeddings-v2-small-en
# - nomic-ai/nomic-embed-text-v1.5
# - sentence-transformers/all-MiniLM-L6-v2
#
## If you cannot download the RAGFlow Docker image:
#
# - For the `nightly-slim` edition, uncomment either of the following:
# RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly-slim
# RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly-slim
#
# - For the `nightly` edition, uncomment either of the following:
# RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly
# RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly# The local time zone.
TIMEZONE='Asia/Shanghai'# Uncomment the following line if you have limited access to huggingface.co:
# HF_ENDPOINT=https://hf-mirror.com# Optimizations for MacOS
# Uncomment the following line if your OS is MacOS:
# MACOS=1# The maximum file size for each uploaded file, in bytes.
# You can uncomment this line and update the value if you wish to change the 128M file size limit
# MAX_CONTENT_LENGTH=134217728
# After making the change, ensure you update `client_max_body_size` in nginx/nginx.conf correspondingly.# The log level for the RAGFlow's owned packages and imported packages.
# Available level:
# - `DEBUG`
# - `INFO` (default)
# - `WARNING`
# - `ERROR`
# For example, following line changes the log level of `ragflow.es_conn` to `DEBUG`:
# LOG_LEVELS=ragflow.es_conn=DEBUG
2、docker-compose-base.yml
services:es01:container_name: ragflow-es-01profiles:- elasticsearchimage: elasticsearch:${STACK_VERSION}volumes:- esdata01:/usr/share/elasticsearch/dataports:- ${ES_PORT}:9200env_file: .envenvironment:- node.name=es01- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}- bootstrap.memory_lock=false- discovery.type=single-node- xpack.security.enabled=true- xpack.security.http.ssl.enabled=false- xpack.security.transport.ssl.enabled=false- cluster.routing.allocation.disk.watermark.low=5gb- cluster.routing.allocation.disk.watermark.high=3gb- cluster.routing.allocation.disk.watermark.flood_stage=2gb- TZ=${TIMEZONE}mem_limit: ${MEM_LIMIT}ulimits:memlock:soft: -1hard: -1healthcheck:test: ["CMD-SHELL", "curl http://localhost:9200"]interval: 10stimeout: 10sretries: 120networks:- ragflowrestart: on-failureinfinity:container_name: ragflow-infinityprofiles:- infinityimage: infiniflow/infinity:v0.6.0-dev3volumes:- infinity_data:/var/infinity- ./infinity_conf.toml:/infinity_conf.tomlcommand: ["-f", "/infinity_conf.toml"]ports:- ${INFINITY_THRIFT_PORT}:23817- ${INFINITY_HTTP_PORT}:23820- ${INFINITY_PSQL_PORT}:5432env_file: .envenvironment:- TZ=${TIMEZONE}mem_limit: ${MEM_LIMIT}ulimits:nofile:soft: 500000hard: 500000networks:- ragflowhealthcheck:test: ["CMD", "curl", "http://localhost:23820/admin/node/current"]interval: 10stimeout: 10sretries: 120restart: on-failuremysql:# mysql:5.7 linux/arm64 image is unavailable.image: mysql:8.0.39container_name: ragflow-mysqlenv_file: .envenvironment:- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}- TZ=${TIMEZONE}command:--max_connections=1000--character-set-server=utf8mb4--collation-server=utf8mb4_unicode_ci--default-authentication-plugin=mysql_native_password--tls_version="TLSv1.2,TLSv1.3"--init-file /data/application/init.sqlports:- ${MYSQL_PORT}:3306volumes:- mysql_data:/var/lib/mysql- ./init.sql:/data/application/init.sqlnetworks:- ragflowhealthcheck:test: ["CMD", "mysqladmin" ,"ping", "-uroot", "-p${MYSQL_PASSWORD}"]interval: 10stimeout: 10sretries: 3restart: on-failureminio:image: quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Zcontainer_name: ragflow-miniocommand: server --console-address ":9001" /dataports:- ${MINIO_PORT}:9000- ${MINIO_CONSOLE_PORT}:9001env_file: .envenvironment:- MINIO_ROOT_USER=${MINIO_USER}- MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}- TZ=${TIMEZONE}volumes:- minio_data:/datanetworks:- ragflowrestart: on-failureredis:# swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/valkey/valkey:8image: valkey/valkey:8container_name: ragflow-rediscommand: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lruenv_file: .envports:- ${REDIS_PORT}:6379volumes:- redis_data:/datanetworks:- ragflowrestart: on-failurevolumes:esdata01:driver: localinfinity_data:driver: localmysql_data:driver: localminio_data:driver: localredis_data:driver: localnetworks:ragflow:driver: bridge
3、 docker-compose.yml
include:- ./docker-compose-base.ymlservices:ragflow:depends_on:mysql:condition: service_healthyimage: ${RAGFLOW_IMAGE}container_name: ragflow-serverports:- ${SVR_HTTP_PORT}:9380- 8880:80- 4443:443volumes:- ./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.confenv_file: .envenvironment:- TZ=${TIMEZONE}- HF_ENDPOINT=${HF_ENDPOINT}- MACOS=${MACOS}networks:- ragflowrestart: 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"# 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"
4、访问地址
http://172.16.50.25:8880/