diff --git a/README.md b/README.md index f48ae8a2ef7..cb054bf0dad 100644 --- a/README.md +++ b/README.md @@ -232,8 +232,7 @@ When it comes to system configurations, you will need to manage the following fi - [docker-compose.yml](./docker/docker-compose.yml): The system relies on [docker-compose.yml](./docker/docker-compose.yml) to start up. -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. +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. > The [./docker/README](./docker/README.md) file provides a detailed description of the environment settings and service > configurations, and you are REQUIRED to ensure that all environment settings listed in diff --git a/docker/.env b/docker/.env index 55c6fc448e5..eccde03849a 100644 --- a/docker/.env +++ b/docker/.env @@ -51,12 +51,13 @@ REDIS_PASSWORD=infini_rag_flow SVR_HTTP_PORT=9380 # The RAGFlow Docker image to download. -# Defaults to the dev-slim edition. +# Defaults to the dev-slim edition, which is the RAGFlow Docker image without embedding models. RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim # # To download the RAGFlow Docker image with embedding models, uncomment the following line instead: +# RAGFLOW_IMAGE=infiniflow/ragflow:dev # -# This Docker image includes: +# The Docker image of the dev edition includes: # - Embedded embedding models: # - BAAI/bge-large-zh-v1.5 # - BAAI/bge-reranker-v2-m3 @@ -72,7 +73,7 @@ RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim # - nomic-ai/nomic-embed-text-v1.5 # - sentence-transformers/all-MiniLM-L6-v2 # -# RAGFLOW_IMAGE=infiniflow/ragflow:dev +# # If you cannot download the RAGFlow Docker image: @@ -92,5 +93,6 @@ TIMEZONE='Asia/Shanghai' # Uncomment the following line if you have limited access to huggingface.co: # HF_ENDPOINT=https://hf-mirror.com +# Optimizations for MacOS # Uncomment the following line if your OS is MacOS: # MACOS=1 diff --git a/docker/README.md b/docker/README.md index 9790c5d10d6..ae872654639 100644 --- a/docker/README.md +++ b/docker/README.md @@ -109,7 +109,7 @@ The [.env](./.env) file contains important environment variables for Docker. - `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. - `MACOS`   -  Optimizations for MacOS. It is disabled by default. You can uncomment this line if your OS is MacOS. + Optimizations for MacOS. It is disabled by default. You can uncomment this line if your OS is MacOS. ## 🐋 Service configuration diff --git a/docs/configurations.md b/docs/configurations.md new file mode 100644 index 00000000000..7e8b9c9c93a --- /dev/null +++ b/docs/configurations.md @@ -0,0 +1,173 @@ +--- +sidebar_position: 1 +slug: /configurations +--- + +# Configurations + +Configurations for installing RAGFlow via Docker. + +## Guidelines + +When it comes to system configurations, you will need to manage the following files: + +- [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env): Contains important environment variables for Docker. +- [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. +- [docker-compose.yml](https://github.com/infiniflow/ragflow/blob/main/docker/docker-compose.yml): The Docker Compose file for starting up the RAGFlow service. + +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. + +To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80` +to `:80`. + +:::tip NOTE +Updates to the above configurations require a reboot of all containers to take effect: + +```bash +docker compose -f docker/docker-compose.yml up -d +``` + +::: + +## Docker Compose + +- **docker-compose.yml** + Sets up environment for RAGFlow and its dependencies. +- **docker-compose-base.yml** + Sets up environment for RAGFlow's base services: Elasticsearch, MySQL, MinIO, and Redis. + +## Docker environment variables + +The [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) file contains important environment variables for Docker. + +### Elasticsearch + +- `STACK_VERSION` + The version of Elasticsearch. Defaults to `8.11.3` +- `ES_PORT` + 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`. +- `ELASTIC_PASSWORD` + 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. + +### Kibana + +- `KIBANA_PORT` + 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`. +- `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` + The maximum amount of the memory, in bytes, that *a specific* Docker container can use while running. Defaults to `8073741824`. + +### MySQL + +- `MYSQL_PASSWORD` + 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. +- `MYSQL_PORT` + 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`. + +### MinIO + +- `MINIO_CONSOLE_PORT` + 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` +- `MINIO_PORT` + 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`. +- `MINIO_USER` + 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. +- `MINIO_PASSWORD` + 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. + +### Redis + +- `REDIS_PORT` + 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`. +- `REDIS_PASSWORD` + 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. + +### RAGFlow + +- `SVR_HTTP_PORT` + 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`. +- `RAGFLOW-IMAGE` + The Docker image edition. Available editions: + + - `infiniflow/ragflow:dev-slim` (default): The RAGFlow Docker image without embedding models. + - `infiniflow/ragflow:dev`: The RAGFlow Docker image with embedding models including: + - Embedded embedding models: + - `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` + +:::tip NOTE +If you cannot download the RAGFlow Docker image, try the following mirrors. + +- 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`. +::: + +### Miscellaneous + +- `TIMEZONE` + The local time zone. Defaults to `'Asia/Shanghai'`. +- `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. +- `MACOS`   + Optimizations for MacOS. It is disabled by default. You can uncomment this line if your OS is MacOS. + +## Service configuration + +[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. + +- `ragflow` + - `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`. + +- `mysql` + - `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](https://github.com/infiniflow/ragflow/blob/main/docker/.env) accordingly. + - `port`: The MySQL serving port inside the Docker container. Defaults to `3306`. + - `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`. + - `stale_timeout`: Timeout in seconds. + +- `minio` + - `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. + - `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. + - `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`. + +- `oauth` + 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**. + - `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. + +- `user_default_llm` + 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**. + - `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. + +:::tip NOTE +If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI. +::: diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index 488244a78d5..21cad0ef0c4 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 1 +sidebar_position: 0 slug: / ---