Updated .env and Docker README (#3295)

### What problem does this PR solve?


### Type of change


- [x] Documentation Update
This commit is contained in:
writinwaters 2024-11-08 16:31:52 +08:00 committed by GitHub
parent 63f7d3bae2
commit 3d3913419b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 89 additions and 66 deletions

View File

@ -1,75 +1,95 @@
# Version of Elastic products # The version of Elasticsearch.
STACK_VERSION=8.11.3 STACK_VERSION=8.11.3
# Port to expose Elasticsearch HTTP API to the host # The port used to expose the Elasticsearch service to the host machine,
# allowing EXTERNAL access to the service running inside the Docker container.
ES_PORT=1200 ES_PORT=1200
# Set the Elasticsearch password # The password for Elasticsearch.
# When updated, you must revise the `es.password` entry in service_conf.yaml accordingly.
ELASTIC_PASSWORD=infini_rag_flow ELASTIC_PASSWORD=infini_rag_flow
# Port to expose Kibana to the host # The port used to expose the Kibana service to the host machine,
# allowing EXTERNAL access to the service running inside the Docker container.
KIBANA_PORT=6601 KIBANA_PORT=6601
KIBANA_USER=rag_flow KIBANA_USER=rag_flow
KIBANA_PASSWORD=infini_rag_flow KIBANA_PASSWORD=infini_rag_flow
# Update according to the available host memory (in bytes) # The maximum amount of the memory, in bytes, that a specific Docker container can use while running.
# Update it according to the available memory in the host machine.
MEM_LIMIT=8073741824 MEM_LIMIT=8073741824
# The password for MySQL.
# When updated, you must revise the `mysql.password` entry in service_conf.yaml.
MYSQL_PASSWORD=infini_rag_flow MYSQL_PASSWORD=infini_rag_flow
# The port used to expose the MySQL service to the host machine,
# allowing EXTERNAL access to the MySQL database running inside the Docker container.
MYSQL_PORT=5455 MYSQL_PORT=5455
# Port to expose minio to the host # 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.
MINIO_CONSOLE_PORT=9001 MINIO_CONSOLE_PORT=9001
# 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.
MINIO_PORT=9000 MINIO_PORT=9000
# The username for MinIO.
# When updated, you must revise the `minio.user` entry in service_conf.yaml accordingly.
MINIO_USER=rag_flow MINIO_USER=rag_flow
# The password for MinIO.
# When updated, you must revise the `minio.password` entry in service_conf.yaml accordingly.
MINIO_PASSWORD=infini_rag_flow MINIO_PASSWORD=infini_rag_flow
# The port used to expose the Redis service to the host machine,
# allowing EXTERNAL access to the Redis service running inside the Docker container.
REDIS_PORT=6379 REDIS_PORT=6379
# The password for Redis.
# When updated, you must revise the `redis.password` entry in service_conf.yaml accordingly.
REDIS_PASSWORD=infini_rag_flow REDIS_PASSWORD=infini_rag_flow
# 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.
SVR_HTTP_PORT=9380 SVR_HTTP_PORT=9380
# the Docker image for the slim version # The RAGFlow Docker image to download.
# Defaults to the dev-slim edition.
RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim
#
# If you cannot download the RAGFlow Docker image, try uncommenting either of the following hub.docker.com mirrors: # To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
# RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev-slim #
# RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev-slim # This Docker image includes:
# - Embedded embedding models:
# To download the RAGFlow Docker image with embedding models, modify the line above as follows: # - 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
#
# RAGFLOW_IMAGE=infiniflow/ragflow:dev # RAGFLOW_IMAGE=infiniflow/ragflow:dev
# This Docker image includes the following four models:
# - BAAI/bge-large-zh-v1.5
# - BAAI/bge-reranker-v2-m3
# - maidalun1020/bce-embedding-base_v1
# - maidalun1020/bce-reranker-base_v1
# And the following models will be downloaded if you select them in the RAGFlow UI. # If you cannot download the RAGFlow Docker image:
# - BAAI/bge-base-en-v1.5 #
# - BAAI/bge-large-en-v1.5 # - For the `dev-slim` edition, uncomment either of the following:
# - BAAI/bge-small-en-v1.5 # RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev-slim
# - BAAI/bge-small-zh-v1.5 # RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev-slim
# - jinaai/jina-embeddings-v2-base-en #
# - jinaai/jina-embeddings-v2-small-en # - For the `dev-slim` edition, uncomment either of the following:
# - nomic-ai/nomic-embed-text-v1.5
# - sentence-transformers/all-MiniLM-L6-v2
# If you cannot download the RAGFlow Docker image, try uncommenting either of the following hub.docker.com mirrors:
# RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev # RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev
# RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev # RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev
# The local time zone.
TIMEZONE='Asia/Shanghai' TIMEZONE='Asia/Shanghai'
# If you cannot download the RAGFlow Docker image, try uncommenting the following huggingface.co mirror: # Uncomment the following line if you have limited access to huggingface.co:
# HF_ENDPOINT=https://hf-mirror.com # HF_ENDPOINT=https://hf-mirror.com
######## OS setup for ES ###########
# sysctl vm.max_map_count
# sudo sysctl -w vm.max_map_count=262144
# Note that this change is not permanent and will be reset after a system reboot.
# To make your change permanent, update /etc/sysctl.conf by:
# Adding or modifying the following line:
# vm.max_map_count=262144

View File

@ -11,8 +11,10 @@
## 🐳 Docker Compose ## 🐳 Docker Compose
- **docker-compose.yml** - **docker-compose.yml**
- **docker-compose-base.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 ## 🐬 Docker environment variables
@ -23,14 +25,14 @@ The [.env](./.env) file contains important environment variables for Docker.
- `STACK_VERSION` - `STACK_VERSION`
The version of Elasticsearch. Defaults to `8.11.3` The version of Elasticsearch. Defaults to `8.11.3`
- `ES_PORT` - `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`. 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 password for Elasticsearch. When updated, you must revise the `es.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly. The password for Elasticsearch. When updated, you must revise the `es.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
### Kibana ### Kibana
- `KIBANA_PORT` - `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`. 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` - `KIBANA_USER`
The username for Kibana. Defaults to `rag_flow`. The username for Kibana. Defaults to `rag_flow`.
- `KIBANA_PASSWORD` - `KIBANA_PASSWORD`
@ -44,32 +46,32 @@ The [.env](./.env) file contains important environment variables for Docker.
### MySQL ### MySQL
- `MYSQL_PASSWORD` - `MYSQL_PASSWORD`
The password for MySQL. When updated, you must 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 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`. 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
- `MINIO_CONSOLE_PORT` - `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` 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` - `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`. 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 username for MinIO. When updated, you must 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 password for MinIO. When updated, you must 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
- `REDIS_PORT` - `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`. 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` - `REDIS_PASSWORD`
The password for Redis. When updated, you must revise the `redis.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly. The password for Redis. When updated, you must revise the `redis.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
### RAGFlow ### RAGFlow
- `SVR_HTTP_PORT` - `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`. 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` - `RAGFLOW-IMAGE`
The Docker image edition. Available editions: The Docker image edition. Available editions:
@ -91,41 +93,42 @@ The [.env](./.env) file contains important environment variables for Docker.
- `sentence-transformers/all-MiniLM-L6-v2` - `sentence-transformers/all-MiniLM-L6-v2`
> [!TIP] > [!TIP]
> If you cannot download the RAGFlow Docker image, try the following mirrors. > 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, > - For the `dev-slim` edition:
> - `RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev`. > - `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 ### Miscellaneous
- `TIMEZONE` - `TIMEZONE`
The local time zone. Defaults to `'Asia/Shanghai'`. 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.
## 🐋 Service configuration ## 🐋 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. [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 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`. - `port`: The API server's serving port inside the Docker container. Defaults to `9380`.
- `mysql` - `mysql`
- `name`: The MySQL database name. Defaults to `rag_flow`. - `name`: The MySQL database name. Defaults to `rag_flow`.
- `user`: The username for MySQL. - `user`: The username for MySQL.
- `password`: The password for MySQL. When updated, you must revise the `MYSQL_PASSWORD` variable in [.env](./.env) accordingly. - `password`: The password for MySQL. When updated, you must revise the `MYSQL_PASSWORD` variable in [.env](./.env) accordingly.
- `port`: The MySQL serving port **inside** the Docker container. Defaults to `3306`. - `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`. - `max_connections`: The maximum number of concurrent connections to the MySQL database. Defaults to `100`.
- `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 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. - `password`: The password for MinIO. When updated, you must 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 MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
- `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**.

View File

@ -19,7 +19,7 @@ es:
password: 'infini_rag_flow' password: 'infini_rag_flow'
redis: redis:
db: 1 db: 1
password: 'infini_rag_flow' password: 'infini_rag_flow'
host: 'redis:6379' host: 'redis:6379'
# postgres: # postgres: