writinwaters
commited on
Commit
·
907411d
1
Parent(s):
4928b00
Added configuration guideline (#3309)
Browse files### What problem does this PR solve?
### Type of change
- [x] Documentation Update
- README.md +1 -2
- docker/.env +5 -3
- docker/README.md +1 -1
- docs/configurations.md +173 -0
- docs/quickstart.mdx +1 -1
README.md
CHANGED
|
@@ -232,8 +232,7 @@ When it comes to system configurations, you will need to manage the following fi
|
|
| 232 |
- [docker-compose.yml](./docker/docker-compose.yml): The system relies
|
| 233 |
on [docker-compose.yml](./docker/docker-compose.yml) to start up.
|
| 234 |
|
| 235 |
-
You must ensure that changes to the [.env](./docker/.env) file are in line with what are in
|
| 236 |
-
the [service_conf.yaml](./docker/service_conf.yaml) file.
|
| 237 |
|
| 238 |
> The [./docker/README](./docker/README.md) file provides a detailed description of the environment settings and service
|
| 239 |
> configurations, and you are REQUIRED to ensure that all environment settings listed in
|
|
|
|
| 232 |
- [docker-compose.yml](./docker/docker-compose.yml): The system relies
|
| 233 |
on [docker-compose.yml](./docker/docker-compose.yml) to start up.
|
| 234 |
|
| 235 |
+
You must ensure that changes to the [.env](./docker/.env) file are in line with what are in the [service_conf.yaml](./docker/service_conf.yaml) file.
|
|
|
|
| 236 |
|
| 237 |
> The [./docker/README](./docker/README.md) file provides a detailed description of the environment settings and service
|
| 238 |
> configurations, and you are REQUIRED to ensure that all environment settings listed in
|
docker/.env
CHANGED
|
@@ -51,12 +51,13 @@ REDIS_PASSWORD=infini_rag_flow
|
|
| 51 |
SVR_HTTP_PORT=9380
|
| 52 |
|
| 53 |
# The RAGFlow Docker image to download.
|
| 54 |
-
# Defaults to the dev-slim edition.
|
| 55 |
RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim
|
| 56 |
#
|
| 57 |
# To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
|
|
|
|
| 58 |
#
|
| 59 |
-
#
|
| 60 |
# - Embedded embedding models:
|
| 61 |
# - BAAI/bge-large-zh-v1.5
|
| 62 |
# - BAAI/bge-reranker-v2-m3
|
|
@@ -72,7 +73,7 @@ RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim
|
|
| 72 |
# - nomic-ai/nomic-embed-text-v1.5
|
| 73 |
# - sentence-transformers/all-MiniLM-L6-v2
|
| 74 |
#
|
| 75 |
-
#
|
| 76 |
|
| 77 |
|
| 78 |
# If you cannot download the RAGFlow Docker image:
|
|
@@ -92,5 +93,6 @@ TIMEZONE='Asia/Shanghai'
|
|
| 92 |
# Uncomment the following line if you have limited access to huggingface.co:
|
| 93 |
# HF_ENDPOINT=https://hf-mirror.com
|
| 94 |
|
|
|
|
| 95 |
# Uncomment the following line if your OS is MacOS:
|
| 96 |
# MACOS=1
|
|
|
|
| 51 |
SVR_HTTP_PORT=9380
|
| 52 |
|
| 53 |
# The RAGFlow Docker image to download.
|
| 54 |
+
# Defaults to the dev-slim edition, which is the RAGFlow Docker image without embedding models.
|
| 55 |
RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim
|
| 56 |
#
|
| 57 |
# To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
|
| 58 |
+
# RAGFLOW_IMAGE=infiniflow/ragflow:dev
|
| 59 |
#
|
| 60 |
+
# The Docker image of the dev edition includes:
|
| 61 |
# - Embedded embedding models:
|
| 62 |
# - BAAI/bge-large-zh-v1.5
|
| 63 |
# - BAAI/bge-reranker-v2-m3
|
|
|
|
| 73 |
# - nomic-ai/nomic-embed-text-v1.5
|
| 74 |
# - sentence-transformers/all-MiniLM-L6-v2
|
| 75 |
#
|
| 76 |
+
#
|
| 77 |
|
| 78 |
|
| 79 |
# If you cannot download the RAGFlow Docker image:
|
|
|
|
| 93 |
# Uncomment the following line if you have limited access to huggingface.co:
|
| 94 |
# HF_ENDPOINT=https://hf-mirror.com
|
| 95 |
|
| 96 |
+
# Optimizations for MacOS
|
| 97 |
# Uncomment the following line if your OS is MacOS:
|
| 98 |
# MACOS=1
|
docker/README.md
CHANGED
|
@@ -109,7 +109,7 @@ The [.env](./.env) file contains important environment variables for Docker.
|
|
| 109 |
- `HF_ENDPOINT`
|
| 110 |
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.
|
| 111 |
- `MACOS`
|
| 112 |
-
|
| 113 |
|
| 114 |
## 🐋 Service configuration
|
| 115 |
|
|
|
|
| 109 |
- `HF_ENDPOINT`
|
| 110 |
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.
|
| 111 |
- `MACOS`
|
| 112 |
+
Optimizations for MacOS. It is disabled by default. You can uncomment this line if your OS is MacOS.
|
| 113 |
|
| 114 |
## 🐋 Service configuration
|
| 115 |
|
docs/configurations.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
sidebar_position: 1
|
| 3 |
+
slug: /configurations
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Configurations
|
| 7 |
+
|
| 8 |
+
Configurations for installing RAGFlow via Docker.
|
| 9 |
+
|
| 10 |
+
## Guidelines
|
| 11 |
+
|
| 12 |
+
When it comes to system configurations, you will need to manage the following files:
|
| 13 |
+
|
| 14 |
+
- [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env): Contains important environment variables for Docker.
|
| 15 |
+
- [service_conf.yaml](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml): Configures the back-end services. It specifies the system-level configuration for RAGFlow and is used by its API server and task executor.
|
| 16 |
+
- [docker-compose.yml](https://github.com/infiniflow/ragflow/blob/main/docker/docker-compose.yml): The Docker Compose file for starting up the RAGFlow service.
|
| 17 |
+
|
| 18 |
+
You must ensure that changes to the [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) file are in line with what are in the [service_conf.yaml](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml) file.
|
| 19 |
+
|
| 20 |
+
To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80`
|
| 21 |
+
to `<YOUR_SERVING_PORT>:80`.
|
| 22 |
+
|
| 23 |
+
:::tip NOTE
|
| 24 |
+
Updates to the above configurations require a reboot of all containers to take effect:
|
| 25 |
+
|
| 26 |
+
```bash
|
| 27 |
+
docker compose -f docker/docker-compose.yml up -d
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
:::
|
| 31 |
+
|
| 32 |
+
## Docker Compose
|
| 33 |
+
|
| 34 |
+
- **docker-compose.yml**
|
| 35 |
+
Sets up environment for RAGFlow and its dependencies.
|
| 36 |
+
- **docker-compose-base.yml**
|
| 37 |
+
Sets up environment for RAGFlow's base services: Elasticsearch, MySQL, MinIO, and Redis.
|
| 38 |
+
|
| 39 |
+
## Docker environment variables
|
| 40 |
+
|
| 41 |
+
The [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) file contains important environment variables for Docker.
|
| 42 |
+
|
| 43 |
+
### Elasticsearch
|
| 44 |
+
|
| 45 |
+
- `STACK_VERSION`
|
| 46 |
+
The version of Elasticsearch. Defaults to `8.11.3`
|
| 47 |
+
- `ES_PORT`
|
| 48 |
+
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`.
|
| 49 |
+
- `ELASTIC_PASSWORD`
|
| 50 |
+
The password for Elasticsearch. When updated, you must revise the `es.password` entry in [service_conf.yaml](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml) accordingly.
|
| 51 |
+
|
| 52 |
+
### Kibana
|
| 53 |
+
|
| 54 |
+
- `KIBANA_PORT`
|
| 55 |
+
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`.
|
| 56 |
+
- `KIBANA_USER`
|
| 57 |
+
The username for Kibana. Defaults to `rag_flow`.
|
| 58 |
+
- `KIBANA_PASSWORD`
|
| 59 |
+
The password for Kibana. Defaults to `infini_rag_flow`.
|
| 60 |
+
|
| 61 |
+
### Resource management
|
| 62 |
+
|
| 63 |
+
- `MEM_LIMIT`
|
| 64 |
+
The maximum amount of the memory, in bytes, that *a specific* Docker container can use while running. Defaults to `8073741824`.
|
| 65 |
+
|
| 66 |
+
### MySQL
|
| 67 |
+
|
| 68 |
+
- `MYSQL_PASSWORD`
|
| 69 |
+
The password for MySQL. When updated, you must revise the `mysql.password` entry in [service_conf.yaml](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml) accordingly.
|
| 70 |
+
- `MYSQL_PORT`
|
| 71 |
+
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`.
|
| 72 |
+
|
| 73 |
+
### MinIO
|
| 74 |
+
|
| 75 |
+
- `MINIO_CONSOLE_PORT`
|
| 76 |
+
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`
|
| 77 |
+
- `MINIO_PORT`
|
| 78 |
+
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`.
|
| 79 |
+
- `MINIO_USER`
|
| 80 |
+
The username for MinIO. When updated, you must revise the `minio.user` entry in [service_conf.yaml](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml) accordingly.
|
| 81 |
+
- `MINIO_PASSWORD`
|
| 82 |
+
The password for MinIO. When updated, you must revise the `minio.password` entry in [service_conf.yaml](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml) accordingly.
|
| 83 |
+
|
| 84 |
+
### Redis
|
| 85 |
+
|
| 86 |
+
- `REDIS_PORT`
|
| 87 |
+
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`.
|
| 88 |
+
- `REDIS_PASSWORD`
|
| 89 |
+
The password for Redis. When updated, you must revise the `redis.password` entry in [service_conf.yaml](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml) accordingly.
|
| 90 |
+
|
| 91 |
+
### RAGFlow
|
| 92 |
+
|
| 93 |
+
- `SVR_HTTP_PORT`
|
| 94 |
+
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`.
|
| 95 |
+
- `RAGFLOW-IMAGE`
|
| 96 |
+
The Docker image edition. Available editions:
|
| 97 |
+
|
| 98 |
+
- `infiniflow/ragflow:dev-slim` (default): The RAGFlow Docker image without embedding models.
|
| 99 |
+
- `infiniflow/ragflow:dev`: The RAGFlow Docker image with embedding models including:
|
| 100 |
+
- Embedded embedding models:
|
| 101 |
+
- `BAAI/bge-large-zh-v1.5`
|
| 102 |
+
- `BAAI/bge-reranker-v2-m3`
|
| 103 |
+
- `maidalun1020/bce-embedding-base_v1`
|
| 104 |
+
- `maidalun1020/bce-reranker-base_v1`
|
| 105 |
+
- Embedding models that will be downloaded once you select them in the RAGFlow UI:
|
| 106 |
+
- `BAAI/bge-base-en-v1.5`
|
| 107 |
+
- `BAAI/bge-large-en-v1.5`
|
| 108 |
+
- `BAAI/bge-small-en-v1.5`
|
| 109 |
+
- `BAAI/bge-small-zh-v1.5`
|
| 110 |
+
- `jinaai/jina-embeddings-v2-base-en`
|
| 111 |
+
- `jinaai/jina-embeddings-v2-small-en`
|
| 112 |
+
- `nomic-ai/nomic-embed-text-v1.5`
|
| 113 |
+
- `sentence-transformers/all-MiniLM-L6-v2`
|
| 114 |
+
|
| 115 |
+
:::tip NOTE
|
| 116 |
+
If you cannot download the RAGFlow Docker image, try the following mirrors.
|
| 117 |
+
|
| 118 |
+
- For the `dev-slim` edition:
|
| 119 |
+
- `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev-slim` or,
|
| 120 |
+
- `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev-slim`.
|
| 121 |
+
- For the `dev` edition:
|
| 122 |
+
- `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev` or,
|
| 123 |
+
- `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev`.
|
| 124 |
+
:::
|
| 125 |
+
|
| 126 |
+
### Miscellaneous
|
| 127 |
+
|
| 128 |
+
- `TIMEZONE`
|
| 129 |
+
The local time zone. Defaults to `'Asia/Shanghai'`.
|
| 130 |
+
- `HF_ENDPOINT`
|
| 131 |
+
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.
|
| 132 |
+
- `MACOS`
|
| 133 |
+
Optimizations for MacOS. It is disabled by default. You can uncomment this line if your OS is MacOS.
|
| 134 |
+
|
| 135 |
+
## Service configuration
|
| 136 |
+
|
| 137 |
+
[service_conf.yaml](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml) specifies the system-level configuration for RAGFlow and is used by its API server and task executor.
|
| 138 |
+
|
| 139 |
+
- `ragflow`
|
| 140 |
+
- `host`: The API server's IP address inside the Docker container. Defaults to `0.0.0.0`.
|
| 141 |
+
- `port`: The API server's serving port inside the Docker container. Defaults to `9380`.
|
| 142 |
+
|
| 143 |
+
- `mysql`
|
| 144 |
+
- `name`: The MySQL database name. Defaults to `rag_flow`.
|
| 145 |
+
- `user`: The username for MySQL.
|
| 146 |
+
- `password`: The password for MySQL. When updated, you must revise the `MYSQL_PASSWORD` variable in [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) accordingly.
|
| 147 |
+
- `port`: The MySQL serving port inside the Docker container. Defaults to `3306`.
|
| 148 |
+
- `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`.
|
| 149 |
+
- `stale_timeout`: Timeout in seconds.
|
| 150 |
+
|
| 151 |
+
- `minio`
|
| 152 |
+
- `user`: The username for MinIO. When updated, you must revise the `MINIO_USER` variable in [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) accordingly.
|
| 153 |
+
- `password`: The password for MinIO. When updated, you must revise the `MINIO_PASSWORD` variable in [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) accordingly.
|
| 154 |
+
- `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
|
| 155 |
+
|
| 156 |
+
- `oauth`
|
| 157 |
+
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**.
|
| 158 |
+
- `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.
|
| 159 |
+
|
| 160 |
+
- `user_default_llm`
|
| 161 |
+
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**.
|
| 162 |
+
- `factory`: The LLM supplier. Available options:
|
| 163 |
+
- `"OpenAI"`
|
| 164 |
+
- `"DeepSeek"`
|
| 165 |
+
- `"Moonshot"`
|
| 166 |
+
- `"Tongyi-Qianwen"`
|
| 167 |
+
- `"VolcEngine"`
|
| 168 |
+
- `"ZHIPU-AI"`
|
| 169 |
+
- `api_key`: The API key for the specified LLM. You will need to apply for your model API key online.
|
| 170 |
+
|
| 171 |
+
:::tip NOTE
|
| 172 |
+
If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.
|
| 173 |
+
:::
|
docs/quickstart.mdx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
sidebar_position:
|
| 3 |
slug: /
|
| 4 |
---
|
| 5 |
|
|
|
|
| 1 |
---
|
| 2 |
+
sidebar_position: 0
|
| 3 |
slug: /
|
| 4 |
---
|
| 5 |
|