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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 base services: Elasticsearch, 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:dev-slim` (default): The RAGFlow Docker image without embedding models.
  57. - `infiniflow/ragflow:dev`: The RAGFlow Docker image with embedding models including:
  58. - Embedded 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 `dev-slim` edition:
  76. > - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev-slim` or,
  77. > - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev-slim`.
  78. > - For the `dev` edition:
  79. > - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev` or,
  80. > - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev`.
  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. ## 🐋 Service configuration
  91. [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).
  92. - `ragflow`
  93. - `host`: The API server's IP address inside the Docker container. Defaults to `0.0.0.0`.
  94. - `port`: The API server's serving port inside the Docker container. Defaults to `9380`.
  95. - `mysql`
  96. - `name`: The MySQL database name. Defaults to `rag_flow`.
  97. - `user`: The username for MySQL.
  98. - `password`: The password for MySQL. When updated, you must revise the `MYSQL_PASSWORD` variable in [.env](./.env) accordingly.
  99. - `port`: The MySQL serving port inside the Docker container. Defaults to `3306`.
  100. - `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`.
  101. - `stale_timeout`: Timeout in seconds.
  102. - `minio`
  103. - `user`: The username for MinIO. When updated, you must revise the `MINIO_USER` variable in [.env](./.env) accordingly.
  104. - `password`: The password for MinIO. When updated, you must revise the `MINIO_PASSWORD` variable in [.env](./.env) accordingly.
  105. - `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
  106. - `oauth`
  107. 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**.
  108. - `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.
  109. - `user_default_llm`
  110. 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**.
  111. - `factory`: The LLM supplier. Available options:
  112. - `"OpenAI"`
  113. - `"DeepSeek"`
  114. - `"Moonshot"`
  115. - `"Tongyi-Qianwen"`
  116. - `"VolcEngine"`
  117. - `"ZHIPU-AI"`
  118. - `api_key`: The API key for the specified LLM. You will need to apply for your model API key online.
  119. > [!TIP]
  120. > If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.