2024-11-05 15:21:37 +08:00
# README
2024-08-15 09:17:36 +08:00
2024-11-07 19:38:50 +08:00
< details open >
2024-11-08 09:22:40 +08:00
< summary > < / b > 📗 Table of Contents< / b > < / summary >
2024-08-15 09:17:36 +08:00
2024-11-07 19:38:50 +08:00
- 🐳 [Docker Compose ](#-docker-compose )
- 🐬 [Docker environment variables ](#-docker-environment-variables )
- 🐋 [Service configuration ](#-service-configuration )
2024-08-15 09:17:36 +08:00
2024-11-07 19:38:50 +08:00
< / details >
2024-08-15 09:17:36 +08:00
2024-11-07 19:38:50 +08:00
## 🐳 Docker Compose
2024-11-08 16:31:52 +08:00
- **docker-compose.yml**
Sets up environment for RAGFlow and its dependencies.
- **docker-compose-base.yml**
2024-11-27 19:26:03 +08:00
Sets up environment for RAGFlow's dependencies: Elasticsearch/[Infinity ](https://github.com/infiniflow/infinity ), MySQL, MinIO, and Redis.
2024-11-07 19:38:50 +08:00
## 🐬 Docker environment variables
The [.env ](./.env ) file contains important environment variables for Docker.
### Elasticsearch
2024-08-15 09:17:36 +08:00
2024-11-05 15:21:37 +08:00
- `STACK_VERSION`
2024-11-07 19:38:50 +08:00
The version of Elasticsearch. Defaults to `8.11.3`
2024-11-05 15:21:37 +08:00
- `ES_PORT`
2024-11-08 16:31:52 +08:00
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` .
2024-11-05 15:21:37 +08:00
- `ELASTIC_PASSWORD`
2024-11-12 15:56:53 +01:00
The password for Elasticsearch.
2024-11-07 19:38:50 +08:00
### Kibana
- `KIBANA_PORT`
2024-11-08 16:31:52 +08:00
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` .
2024-11-07 19:38:50 +08:00
- `KIBANA_USER`
The username for Kibana. Defaults to `rag_flow` .
- `KIBANA_PASSWORD`
The password for Kibana. Defaults to `infini_rag_flow` .
### Resource management
- `MEM_LIMIT`
2024-11-08 09:22:40 +08:00
The maximum amount of the memory, in bytes, that *a specific* Docker container can use while running. Defaults to `8073741824` .
2024-11-07 19:38:50 +08:00
### MySQL
2024-11-05 15:21:37 +08:00
- `MYSQL_PASSWORD`
2024-11-12 15:56:53 +01:00
The password for MySQL.
2024-11-05 15:21:37 +08:00
- `MYSQL_PORT`
2024-11-08 16:31:52 +08:00
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` .
2024-11-07 19:38:50 +08:00
### MinIO
- `MINIO_CONSOLE_PORT`
2024-11-08 16:31:52 +08:00
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`
2024-11-07 19:38:50 +08:00
- `MINIO_PORT`
2024-11-08 16:31:52 +08:00
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` .
2024-11-05 15:21:37 +08:00
- `MINIO_USER`
2024-11-12 15:56:53 +01:00
The username for MinIO.
2024-11-05 15:21:37 +08:00
- `MINIO_PASSWORD`
2024-11-12 15:56:53 +01:00
The password for MinIO.
2024-11-07 19:38:50 +08:00
### Redis
- `REDIS_PORT`
2024-11-08 16:31:52 +08:00
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` .
2024-11-07 19:38:50 +08:00
- `REDIS_PASSWORD`
2024-11-12 15:56:53 +01:00
The password for Redis.
2024-11-07 19:38:50 +08:00
### RAGFlow
2024-11-05 15:21:37 +08:00
- `SVR_HTTP_PORT`
2024-11-08 16:31:52 +08:00
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` .
2024-11-05 15:21:37 +08:00
- `RAGFLOW-IMAGE`
2024-11-07 19:38:50 +08:00
The Docker image edition. Available editions:
- `infiniflow/ragflow:dev-slim` (default): The RAGFlow Docker image without embedding models.
2024-11-06 09:43:54 +08:00
- `infiniflow/ragflow:dev` : The RAGFlow Docker image with embedding models including:
2024-11-22 11:11:06 +08:00
- Built-in embedding models:
2024-11-06 09:43:54 +08:00
- `BAAI/bge-large-zh-v1.5`
- `BAAI/bge-reranker-v2-m3`
- `maidalun1020/bce-embedding-base_v1`
- `maidalun1020/bce-reranker-base_v1`
- Embedding models that will be downloaded once you select them in the RAGFlow UI:
- `BAAI/bge-base-en-v1.5`
- `BAAI/bge-large-en-v1.5`
- `BAAI/bge-small-en-v1.5`
- `BAAI/bge-small-zh-v1.5`
- `jinaai/jina-embeddings-v2-base-en`
- `jinaai/jina-embeddings-v2-small-en`
- `nomic-ai/nomic-embed-text-v1.5`
- `sentence-transformers/all-MiniLM-L6-v2`
2024-11-07 19:38:50 +08:00
2024-11-08 09:22:40 +08:00
> [!TIP]
2024-11-08 16:31:52 +08:00
> If you cannot download the RAGFlow Docker image, try the following mirrors.
2024-11-08 09:22:40 +08:00
>
2024-11-08 16:31:52 +08:00
> - For the `dev-slim` edition:
> - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev-slim` or,
> - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev-slim`.
> - For the `dev` edition:
> - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev` or,
> - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev`.
2024-11-07 19:38:50 +08:00
2024-11-12 19:56:56 +08:00
### Timezone
2024-08-15 09:17:36 +08:00
2024-11-07 19:38:50 +08:00
- `TIMEZONE`
The local time zone. Defaults to `'Asia/Shanghai'` .
2024-11-12 19:56:56 +08:00
### Hugging Face mirror site
2024-11-08 16:31:52 +08:00
- `HF_ENDPOINT`
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.
2024-11-12 19:56:56 +08:00
### MacOS
- `MACOS`
2024-11-08 19:46:18 +08:00
Optimizations for MacOS. It is disabled by default. You can uncomment this line if your OS is MacOS.
2024-08-15 09:17:36 +08:00
2024-11-22 11:11:06 +08:00
### Maximum file size
- `MAX_CONTENT_LENGTH`
2024-11-25 14:31:01 +08:00
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.
2024-11-22 11:11:06 +08:00
2024-11-07 19:38:50 +08:00
## 🐋 Service configuration
2024-08-15 09:17:36 +08:00
2024-11-12 15:56:53 +01:00
[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).
2024-08-15 09:17:36 +08:00
2024-11-05 15:21:37 +08:00
- `ragflow`
2024-11-08 16:31:52 +08:00
- `host` : The API server's IP address inside the Docker container. Defaults to `0.0.0.0` .
- `port` : The API server's serving port inside the Docker container. Defaults to `9380` .
2024-11-07 19:38:50 +08:00
2024-11-05 15:21:37 +08:00
- `mysql`
2024-11-07 19:38:50 +08:00
- `name` : The MySQL database name. Defaults to `rag_flow` .
- `user` : The username for MySQL.
- `password` : The password for MySQL. When updated, you must revise the `MYSQL_PASSWORD` variable in [.env ](./.env ) accordingly.
2024-11-08 16:31:52 +08:00
- `port` : The MySQL serving port inside the Docker container. Defaults to `3306` .
2024-11-07 19:38:50 +08:00
- `max_connections` : The maximum number of concurrent connections to the MySQL database. Defaults to `100` .
2024-11-06 09:43:54 +08:00
- `stale_timeout` : Timeout in seconds.
2024-11-07 19:38:50 +08:00
2024-11-05 15:21:37 +08:00
- `minio`
2024-11-07 19:38:50 +08:00
- `user` : The username for MinIO. When updated, you must revise the `MINIO_USER` variable in [.env ](./.env ) accordingly.
- `password` : The password for MinIO. When updated, you must revise the `MINIO_PASSWORD` variable in [.env ](./.env ) accordingly.
2024-11-08 16:31:52 +08:00
- `host` : The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000` .
2024-11-07 19:38:50 +08:00
2024-11-08 09:22:40 +08:00
- `oauth`
2024-11-12 15:56:53 +01:00
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** .
2024-11-08 09:22:40 +08:00
- `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.
2024-11-07 19:38:50 +08:00
- `user_default_llm`
2024-11-12 15:56:53 +01:00
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** .
2024-11-07 19:38:50 +08:00
- `factory` : The LLM supplier. Available options:
- `"OpenAI"`
- `"DeepSeek"`
- `"Moonshot"`
- `"Tongyi-Qianwen"`
- `"VolcEngine"`
- `"ZHIPU-AI"`
- `api_key` : The API key for the specified LLM. You will need to apply for your model API key online.
2024-11-08 09:22:40 +08:00
> [!TIP]
2024-11-22 11:11:06 +08:00
> If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.