You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. ## 🐬 Docker environment variables
  14. The [.env](./.env) file contains important environment variables for Docker.
  15. ### Elasticsearch
  16. - `STACK_VERSION`
  17. The version of Elasticsearch. Defaults to `8.11.3`
  18. - `ES_PORT`
  19. 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`.
  20. - `ELASTIC_PASSWORD`
  21. The password for Elasticsearch.
  22. ### Kibana
  23. - `KIBANA_PORT`
  24. 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`.
  25. - `KIBANA_USER`
  26. The username for Kibana. Defaults to `rag_flow`.
  27. - `KIBANA_PASSWORD`
  28. The password for Kibana. Defaults to `infini_rag_flow`.
  29. ### Resource management
  30. - `MEM_LIMIT`
  31. The maximum amount of the memory, in bytes, that *a specific* Docker container can use while running. Defaults to `8073741824`.
  32. ### MySQL
  33. - `MYSQL_PASSWORD`
  34. The password for MySQL.
  35. - `MYSQL_PORT`
  36. 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`.
  37. ### MinIO
  38. - `MINIO_CONSOLE_PORT`
  39. 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`
  40. - `MINIO_PORT`
  41. 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`.
  42. - `MINIO_USER`
  43. The username for MinIO.
  44. - `MINIO_PASSWORD`
  45. The password for MinIO.
  46. ### Redis
  47. - `REDIS_PORT`
  48. 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`.
  49. - `REDIS_PASSWORD`
  50. The password for Redis.
  51. ### RAGFlow
  52. - `SVR_HTTP_PORT`
  53. 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`.
  54. - `RAGFLOW-IMAGE`
  55. The Docker image edition. Available editions:
  56. - `infiniflow/ragflow:v0.14.1-slim` (default): The RAGFlow Docker image without embedding models.
  57. - `infiniflow/ragflow:v0.14.1`: The RAGFlow Docker image with embedding models including:
  58. - Built-in embedding models:
  59. - `BAAI/bge-large-zh-v1.5`
  60. - `BAAI/bge-reranker-v2-m3`
  61. - `maidalun1020/bce-embedding-base_v1`
  62. - `maidalun1020/bce-reranker-base_v1`
  63. - Embedding models that will be downloaded once you select them in the RAGFlow UI:
  64. - `BAAI/bge-base-en-v1.5`
  65. - `BAAI/bge-large-en-v1.5`
  66. - `BAAI/bge-small-en-v1.5`
  67. - `BAAI/bge-small-zh-v1.5`
  68. - `jinaai/jina-embeddings-v2-base-en`
  69. - `jinaai/jina-embeddings-v2-small-en`
  70. - `nomic-ai/nomic-embed-text-v1.5`
  71. - `sentence-transformers/all-MiniLM-L6-v2`
  72. > [!TIP]
  73. > If you cannot download the RAGFlow Docker image, try the following mirrors.
  74. >
  75. > - For the `nightly-slim` edition:
  76. > - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly-slim` or,
  77. > - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly-slim`.
  78. > - For the `nightly` edition:
  79. > - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly` or,
  80. > - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly`.
  81. ### Timezone
  82. - `TIMEZONE`
  83. The local time zone. Defaults to `'Asia/Shanghai'`.
  84. ### Hugging Face mirror site
  85. - `HF_ENDPOINT`
  86. 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.
  87. ### MacOS
  88. - `MACOS`
  89. Optimizations for macOS. It is disabled by default. You can uncomment this line if your OS is macOS.
  90. ### Maximum file size
  91. - `MAX_CONTENT_LENGTH`
  92. 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. Please also update `client_max_body_size` in nginx/nginx.conf correspondingly.
  93. ## 🐋 Service configuration
  94. [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).
  95. - `ragflow`
  96. - `host`: The API server's IP address inside the Docker container. Defaults to `0.0.0.0`.
  97. - `port`: The API server's serving port inside the Docker container. Defaults to `9380`.
  98. - `mysql`
  99. - `name`: The MySQL database name. Defaults to `rag_flow`.
  100. - `user`: The username for MySQL.
  101. - `password`: The password for MySQL.
  102. - `port`: The MySQL serving port inside the Docker container. Defaults to `3306`.
  103. - `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`.
  104. - `stale_timeout`: Timeout in seconds.
  105. - `minio`
  106. - `user`: The username for MinIO.
  107. - `password`: The password for MinIO.
  108. - `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
  109. - `oauth`
  110. 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**.
  111. - `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.
  112. - `user_default_llm`
  113. 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**.
  114. - `factory`: The LLM supplier. Available options:
  115. - `"OpenAI"`
  116. - `"DeepSeek"`
  117. - `"Moonshot"`
  118. - `"Tongyi-Qianwen"`
  119. - `"VolcEngine"`
  120. - `"ZHIPU-AI"`
  121. - `api_key`: The API key for the specified LLM. You will need to apply for your model API key online.
  122. > [!TIP]
  123. > If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.