Refactored Docker README (#3269)

### What problem does this PR solve?



### Type of change

- [x] Documentation Update
This commit is contained in:
writinwaters 2024-11-07 19:38:50 +08:00 committed by GitHub
parent 48ab6d7a45
commit 7c0d28b62d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,32 +1,79 @@
# README # README
<details open>
<summary></b>📕 Table of Contents</b></summary>
- 🐳 [Docker Compose](#-docker-compose)
- 🐬 [Docker environment variables](#-docker-environment-variables)
- 🐋 [Service configuration](#-service-configuration)
## Docker environment variables </details>
Look into [.env](./.env), there're some important variables. ## 🐳 Docker Compose
- **docker-compose.yml**
- **docker-compose-base.yml**
## 🐬 Docker environment variables
The [.env](./.env) file contains important environment variables for Docker.
### Elasticsearch
- `STACK_VERSION` - `STACK_VERSION`
The Elasticsearch version. Defaults to `8.11.3` The version of Elasticsearch. Defaults to `8.11.3`
- `ES_PORT` - `ES_PORT`
Port to expose Elasticsearch HTTP API to the host. Defaults to `1200`. 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` - `ELASTIC_PASSWORD`
The Elasticsearch password. The password for Elasticsearch. When updated, you must revise the `es.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
### Kibana
- `KIBANA_PORT`
The port used to expose the Kibana service to the host machine. 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 that *a specific* Docker container can use while running. Defaults to `8073741824`.
### MySQL
- `MYSQL_PASSWORD` - `MYSQL_PASSWORD`
The MySQL password. When updated, you must also revise the `mysql.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly. The password for MySQL. When updated, you must revise the `mysql.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
- `MYSQL_PORT` - `MYSQL_PORT`
The exported port number of MySQL Docker container, needed when you access the database from outside the Docker container. 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` - `MINIO_USER`
The MinIO username. When updated, you must also revise the `minio.user` entry in [service_conf.yaml](./service_conf.yaml) accordingly. The username for MinIO. When updated, you must revise the `minio.user` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
- `MINIO_PASSWORD` - `MINIO_PASSWORD`
The MinIO password. When updated, you must also revise the `minio.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly. The password for MinIO. When updated, you must revise the `minio.password` entry in [service_conf.yaml](./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](./service_conf.yaml) accordingly.
### RAGFlow
- `SVR_HTTP_PORT` - `SVR_HTTP_PORT`
The port number on which RAGFlow's backend API server listens. 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`.
- `TIMEZONE`
The local time zone.
- `RAGFLOW-IMAGE` - `RAGFLOW-IMAGE`
The Docker image edition. Available options: The Docker image edition. Available editions:
- `infiniflow/ragflow:dev-slim` (default): The RAGFlow Docker image without embedding models
- `infiniflow/ragflow:dev-slim` (default): The RAGFlow Docker image without embedding models.
- `infiniflow/ragflow:dev`: The RAGFlow Docker image with embedding models including: - `infiniflow/ragflow:dev`: The RAGFlow Docker image with embedding models including:
- Embedded embedding models: - Embedded embedding models:
- `BAAI/bge-large-zh-v1.5` - `BAAI/bge-large-zh-v1.5`
@ -43,40 +90,56 @@ Look into [.env](./.env), there're some important variables.
- `nomic-ai/nomic-embed-text-v1.5` - `nomic-ai/nomic-embed-text-v1.5`
- `sentence-transformers/all-MiniLM-L6-v2` - `sentence-transformers/all-MiniLM-L6-v2`
> [!TIP]
>
> If you cannot download the RAGFlow Docker image, try the following mirrors.
> - For `dev-slim`:
> - `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 `dev`:
> - `RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev` or,
> - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev`.
## Service Configuration ### Miscellaneous
[service_conf.yaml](./service_conf.yaml) defines the system-level configuration for RAGFlow and is used by its API server and task executor. - `TIMEZONE`
The local time zone. Defaults to `'Asia/Shanghai'`.
## 🐋 Service configuration
[service_conf.yaml](./service_conf.yaml) specifies the system-level configuration for RAGFlow and is used by its API server and task executor.
- `ragflow` - `ragflow`
- `host`: The API server's IP address **inside** the Docker container. Defaults to `0.0.0.0`.
- `host`: The IP address of the API server. - `port`: The API server's serving port **inside** the Docker container. Defaults to `9380`.
- `port`: The serving port of API server.
- `mysql` - `mysql`
- `name`: The MySQL database name. Defaults to `rag_flow`.
- `name`: The database name in MySQL used by RAGFlow. Defaults to `rag_flow`. - `user`: The username for MySQL.
- `user`: The MySQL user name. - `password`: The password for MySQL. When updated, you must revise the `MYSQL_PASSWORD` variable in [.env](./.env) accordingly.
- `password`: The MySQL password. When updated, you must also revise the `MYSQL_PASSWORD` variable in [.env](./.env) accordingly. - `port`: The MySQL serving port **inside** the Docker container. Defaults to `3306`.
- `port`: The serving port of MySQL inside the Docker container. When updated, you must also revise the `MYSQL_PORT` variable in [.env](./.env) accordingly. - `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`.
- `max_connections`: The maximum database connection.
- `stale_timeout`: Timeout in seconds. - `stale_timeout`: Timeout in seconds.
- `minio` - `minio`
- `user`: The username for MinIO. When updated, you must revise the `MINIO_USER` variable in [.env](./.env) accordingly.
- `user`: The MinIO username. When updated, you must also 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.
- `password`: The MinIO password. When updated, you must also revise the `MINIO_PASSWORD` variable in [.env](./.env) accordingly. - `host`: The MinIO serving IP *and* port **inside** the Docker container. Defaults to `minio:9000`.
- `host`: The serving IP and port inside the docker container. This is not updated until changing the minio part in [docker-compose.yml](./docker-compose.yml)
- `user_default_llm` - `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**.
The default LLM to use for a new RAGFlow user. It is disabled by default. If you have not set it here, you can configure the default LLM on the **Settings** page in the RAGFlow UI. Newly signed-up users use LLM configured by this part; otherwise, you need to configure your own LLM on the *Settings* page. > [!TIP]
>
- `factory`: The LLM suppliers. "OpenAI" "Tongyi-Qianwen", "ZHIPU-AI", "Moonshot", "DeepSeek", "Baichuan", and "VolcEngine" are supported. > If you do not set the default LLM here, configure the default LLM on the **Settings** page in the RAGFlow UI.
- `api_key`: The API key for the specified LLM. - `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.
- `oauth` - `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**. 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 page](https://github.com/settings/developers) to obtain your client_id and secret_key. - `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.