您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. # README
  2. <details open>
  3. <summary></b>📗 Table of Contents</b></summary>
  4. - 🐳 [Docker Compose](#-docker-compose)
  5. - 🐬 [Docker environment variables](#-docker-environment-variables)
  6. - 🐋 [Service configuration](#-service-configuration)
  7. </details>
  8. ## 🐳 Docker Compose
  9. - **docker-compose.yml**
  10. Sets up environment for RAGFlow and its dependencies.
  11. - **docker-compose-base.yml**
  12. Sets up environment for RAGFlow's dependencies: Elasticsearch/[Infinity](https://github.com/infiniflow/infinity), MySQL, MinIO, and Redis.
  13. > [!CAUTION]
  14. > We do not actively maintain **docker-compose-CN-oc9.yml**, **docker-compose-gpu-CN-oc9.yml**, or **docker-compose-gpu.yml**, so use them at your own risk. However, you are welcome to file a pull request to improve any of them.
  15. ## 🐬 Docker environment variables
  16. The [.env](./.env) file contains important environment variables for Docker.
  17. ### Elasticsearch
  18. - `STACK_VERSION`
  19. The version of Elasticsearch. Defaults to `8.11.3`
  20. - `ES_PORT`
  21. The port used to expose the Elasticsearch service to the host machine, allowing **external** access to the service running inside the Docker container. Defaults to `1200`.
  22. - `ELASTIC_PASSWORD`
  23. The password for Elasticsearch.
  24. ### Kibana
  25. - `KIBANA_PORT`
  26. The port used to expose the Kibana service to the host machine, allowing **external** access to the service running inside the Docker container. Defaults to `6601`.
  27. - `KIBANA_USER`
  28. The username for Kibana. Defaults to `rag_flow`.
  29. - `KIBANA_PASSWORD`
  30. The password for Kibana. Defaults to `infini_rag_flow`.
  31. ### Resource management
  32. - `MEM_LIMIT`
  33. The maximum amount of the memory, in bytes, that *a specific* Docker container can use while running. Defaults to `8073741824`.
  34. ### MySQL
  35. - `MYSQL_PASSWORD`
  36. The password for MySQL.
  37. - `MYSQL_PORT`
  38. The port used to expose the MySQL service to the host machine, allowing **external** access to the MySQL database running inside the Docker container. Defaults to `5455`.
  39. ### MinIO
  40. - `MINIO_CONSOLE_PORT`
  41. 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. Defaults to `9001`
  42. - `MINIO_PORT`
  43. 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. Defaults to `9000`.
  44. - `MINIO_USER`
  45. The username for MinIO.
  46. - `MINIO_PASSWORD`
  47. The password for MinIO.
  48. ### Redis
  49. - `REDIS_PORT`
  50. The port used to expose the Redis service to the host machine, allowing **external** access to the Redis service running inside the Docker container. Defaults to `6379`.
  51. - `REDIS_PASSWORD`
  52. The password for Redis.
  53. ### RAGFlow
  54. - `SVR_HTTP_PORT`
  55. 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. Defaults to `9380`.
  56. - `RAGFLOW-IMAGE`
  57. The Docker image edition. Available editions:
  58. - `infiniflow/ragflow:v0.15.0-slim` (default): The RAGFlow Docker image without embedding models.
  59. - `infiniflow/ragflow:v0.15.0`: The RAGFlow Docker image with embedding models including:
  60. - Built-in embedding models:
  61. - `BAAI/bge-large-zh-v1.5`
  62. - `BAAI/bge-reranker-v2-m3`
  63. - `maidalun1020/bce-embedding-base_v1`
  64. - `maidalun1020/bce-reranker-base_v1`
  65. - Embedding models that will be downloaded once you select them in the RAGFlow UI:
  66. - `BAAI/bge-base-en-v1.5`
  67. - `BAAI/bge-large-en-v1.5`
  68. - `BAAI/bge-small-en-v1.5`
  69. - `BAAI/bge-small-zh-v1.5`
  70. - `jinaai/jina-embeddings-v2-base-en`
  71. - `jinaai/jina-embeddings-v2-small-en`
  72. - `nomic-ai/nomic-embed-text-v1.5`
  73. - `sentence-transformers/all-MiniLM-L6-v2`
  74. > [!TIP]
  75. > If you cannot download the RAGFlow Docker image, try the following mirrors.
  76. >
  77. > - For the `nightly-slim` edition:
  78. > - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly-slim` or,
  79. > - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly-slim`.
  80. > - For the `nightly` edition:
  81. > - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly` or,
  82. > - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly`.
  83. ### Timezone
  84. - `TIMEZONE`
  85. The local time zone. Defaults to `'Asia/Shanghai'`.
  86. ### Hugging Face mirror site
  87. - `HF_ENDPOINT`
  88. The mirror site for huggingface.co. It is disabled by default. You can uncomment this line if you have limited access to the primary Hugging Face domain.
  89. ### MacOS
  90. - `MACOS`
  91. Optimizations for macOS. It is disabled by default. You can uncomment this line if your OS is macOS.
  92. ### Maximum file size
  93. - `MAX_CONTENT_LENGTH`
  94. The maximum file size for each uploaded file, in bytes. You can uncomment this line if you wish to change the 128M file size limit. After making the change, ensure you update `client_max_body_size` in nginx/nginx.conf correspondingly.
  95. ## 🐋 Service configuration
  96. [service_conf.yaml](./service_conf.yaml) specifies the system-level configuration for RAGFlow and is used by its API server and task executor. In a dockerized setup, this file is automatically created based on the [service_conf.yaml.template](./service_conf.yaml.template) file (replacing all environment variables by their values).
  97. - `ragflow`
  98. - `host`: The API server's IP address inside the Docker container. Defaults to `0.0.0.0`.
  99. - `port`: The API server's serving port inside the Docker container. Defaults to `9380`.
  100. - `mysql`
  101. - `name`: The MySQL database name. Defaults to `rag_flow`.
  102. - `user`: The username for MySQL.
  103. - `password`: The password for MySQL.
  104. - `port`: The MySQL serving port inside the Docker container. Defaults to `3306`.
  105. - `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`.
  106. - `stale_timeout`: Timeout in seconds.
  107. - `minio`
  108. - `user`: The username for MinIO.
  109. - `password`: The password for MinIO.
  110. - `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
  111. - `oauth`
  112. The OAuth configuration for signing up or signing in to RAGFlow using a third-party account. It is disabled by default. To enable this feature, uncomment the corresponding lines in **service_conf.yaml.template**.
  113. - `github`: The GitHub authentication settings for your application. Visit the [Github Developer Settings page](https://github.com/settings/developers) to obtain your client_id and secret_key.
  114. - `user_default_llm`
  115. The default LLM to use for a new RAGFlow user. It is disabled by default. To enable this feature, uncomment the corresponding lines in **service_conf.yaml.template**.
  116. - `factory`: The LLM supplier. Available options:
  117. - `"OpenAI"`
  118. - `"DeepSeek"`
  119. - `"Moonshot"`
  120. - `"Tongyi-Qianwen"`
  121. - `"VolcEngine"`
  122. - `"ZHIPU-AI"`
  123. - `api_key`: The API key for the specified LLM. You will need to apply for your model API key online.
  124. > [!TIP]
  125. > If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.