Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

configurations.md 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. ---
  2. sidebar_position: 1
  3. slug: /configurations
  4. ---
  5. # Configuration
  6. Configurations for deploying RAGFlow via Docker.
  7. ## Guidelines
  8. When it comes to system configurations, you will need to manage the following files:
  9. - [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env): Contains important environment variables for Docker.
  10. - [service_conf.yaml.template](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml.template): Configures the back-end services. It specifies the system-level configuration for RAGFlow and is used by its API server and task executor. Upon container startup, the `service_conf.yaml` file will be generated based on this template file. This process replaces any environment variables within the template, allowing for dynamic configuration tailored to the container's environment.
  11. - [docker-compose.yml](https://github.com/infiniflow/ragflow/blob/main/docker/docker-compose.yml): The Docker Compose file for starting up the RAGFlow service.
  12. To update the default HTTP serving port (80), go to [docker-compose.yml](https://github.com/infiniflow/ragflow/blob/main/docker/docker-compose.yml) and change `80:80`
  13. to `<YOUR_SERVING_PORT>:80`.
  14. :::tip NOTE
  15. Updates to the above configurations require a reboot of all containers to take effect:
  16. ```bash
  17. docker compose -f docker/docker-compose.yml up -d
  18. ```
  19. :::
  20. ## Docker Compose
  21. - **docker-compose.yml**
  22. Sets up environment for RAGFlow and its dependencies.
  23. - **docker-compose-base.yml**
  24. Sets up environment for RAGFlow's dependencies: Elasticsearch/[Infinity](https://github.com/infiniflow/infinity), MySQL, MinIO, and Redis.
  25. :::danger IMPORTANT
  26. 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.
  27. :::
  28. ## Docker environment variables
  29. The [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) file contains important environment variables for Docker.
  30. ### Elasticsearch
  31. - `STACK_VERSION`
  32. The version of Elasticsearch. Defaults to `8.11.3`
  33. - `ES_PORT`
  34. 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`.
  35. - `ELASTIC_PASSWORD`
  36. The password for Elasticsearch.
  37. ### Kibana
  38. - `KIBANA_PORT`
  39. 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`.
  40. - `KIBANA_USER`
  41. The username for Kibana. Defaults to `rag_flow`.
  42. - `KIBANA_PASSWORD`
  43. The password for Kibana. Defaults to `infini_rag_flow`.
  44. ### Resource management
  45. - `MEM_LIMIT`
  46. The maximum amount of the memory, in bytes, that *a specific* Docker container can use while running. Defaults to `8073741824`.
  47. ### MySQL
  48. - `MYSQL_PASSWORD`
  49. The password for MySQL.
  50. - `MYSQL_PORT`
  51. 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`.
  52. ### MinIO
  53. - `MINIO_CONSOLE_PORT`
  54. 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`
  55. - `MINIO_PORT`
  56. 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`.
  57. - `MINIO_USER`
  58. The username for MinIO.
  59. - `MINIO_PASSWORD`
  60. The password for MinIO.
  61. ### Redis
  62. - `REDIS_PORT`
  63. 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`.
  64. - `REDIS_PASSWORD`
  65. The password for Redis.
  66. ### RAGFlow
  67. - `SVR_HTTP_PORT`
  68. 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`.
  69. - `RAGFLOW-IMAGE`
  70. The Docker image edition. Available editions:
  71. - `infiniflow/ragflow:v0.17.2-slim` (default): The RAGFlow Docker image without embedding models.
  72. - `infiniflow/ragflow:v0.17.2`: The RAGFlow Docker image with embedding models including:
  73. - Built-in embedding models:
  74. - `BAAI/bge-large-zh-v1.5`
  75. - `maidalun1020/bce-embedding-base_v1`
  76. :::tip NOTE
  77. If you cannot download the RAGFlow Docker image, try the following mirrors.
  78. - For the `nightly-slim` edition:
  79. - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly-slim` or,
  80. - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly-slim`.
  81. - For the `nightly` edition:
  82. - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly` or,
  83. - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly`.
  84. :::
  85. ### Timezone
  86. - `TIMEZONE`
  87. The local time zone. Defaults to `'Asia/Shanghai'`.
  88. ### Hugging Face mirror site
  89. - `HF_ENDPOINT`
  90. 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.
  91. ### MacOS
  92. - `MACOS`
  93. Optimizations for macOS. It is disabled by default. You can uncomment this line if your OS is macOS.
  94. ## Service configuration
  95. [service_conf.yaml.template](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml.template) specifies the system-level configuration for RAGFlow and is used by its API server and task executor.
  96. ### `ragflow`
  97. - `host`: The API server's IP address inside the Docker container. Defaults to `0.0.0.0`.
  98. - `port`: The API server's serving port inside the Docker container. Defaults to `9380`.
  99. ### `mysql`
  100. - `name`: The MySQL database name. Defaults to `rag_flow`.
  101. - `user`: The username for MySQL.
  102. - `password`: The password for MySQL.
  103. - `port`: The MySQL serving port inside the Docker container. Defaults to `3306`.
  104. - `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`.
  105. - `stale_timeout`: Timeout in seconds.
  106. ### `minio`
  107. - `user`: The username for MinIO.
  108. - `password`: The password for MinIO.
  109. - `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
  110. ### `oauth`
  111. 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**.
  112. - `github`: The GitHub authentication settings for your application. Visit the [GitHub Developer Settings](https://github.com/settings/developers) page to obtain your client_id and secret_key.
  113. ### `user_default_llm`
  114. 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**.
  115. - `factory`: The LLM supplier. Available options:
  116. - `"OpenAI"`
  117. - `"DeepSeek"`
  118. - `"Moonshot"`
  119. - `"Tongyi-Qianwen"`
  120. - `"VolcEngine"`
  121. - `"ZHIPU-AI"`
  122. - `api_key`: The API key for the specified LLM. You will need to apply for your model API key online.
  123. :::tip NOTE
  124. If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.
  125. :::