Guido Schmutz Kevin Hu zhichyu commited on
Commit
49f80bf
·
1 Parent(s): 8b7269c

Dynamically create the service_conf.yaml file by replacing environment variables from .env (#3341)

Browse files

### What problem does this PR solve?

This pull request implements the feature mentioned in #3322.

Instead of manually having to edit the `service_conf.yaml` file when
changes have been made to `.env` and mapping it into the docker
container at runtime, a template file is used and the values replaced by
the environment variables from the `.env` file when the container is
started.


### Type of change

- [X] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: Kevin Hu <[email protected]>
Co-authored-by: Zhichang Yu <[email protected]>

Dockerfile CHANGED
@@ -129,6 +129,7 @@ ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
129
 
130
  ENV PYTHONPATH=/ragflow/
131
 
 
132
  COPY docker/entrypoint.sh ./entrypoint.sh
133
  RUN chmod +x ./entrypoint.sh
134
 
 
129
 
130
  ENV PYTHONPATH=/ragflow/
131
 
132
+ COPY docker/service_conf.yaml.template ./conf/service_conf.yaml.template
133
  COPY docker/entrypoint.sh ./entrypoint.sh
134
  RUN chmod +x ./entrypoint.sh
135
 
Dockerfile.scratch.oc9 CHANGED
@@ -53,6 +53,7 @@ RUN conda run -n py11 python -m nltk.downloader wordnet
53
  ENV PYTHONPATH=/ragflow/
54
  ENV HF_ENDPOINT=https://hf-mirror.com
55
 
 
56
  ADD docker/entrypoint.sh ./entrypoint.sh
57
  RUN chmod +x ./entrypoint.sh
58
 
 
53
  ENV PYTHONPATH=/ragflow/
54
  ENV HF_ENDPOINT=https://hf-mirror.com
55
 
56
+ COPY docker/service_conf.yaml.template ./conf/service_conf.yaml.template
57
  ADD docker/entrypoint.sh ./entrypoint.sh
58
  RUN chmod +x ./entrypoint.sh
59
 
Dockerfile.slim CHANGED
@@ -122,6 +122,7 @@ ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
122
 
123
  ENV PYTHONPATH=/ragflow/
124
 
 
125
  COPY docker/entrypoint.sh ./entrypoint.sh
126
  RUN chmod +x ./entrypoint.sh
127
 
 
122
 
123
  ENV PYTHONPATH=/ragflow/
124
 
125
+ COPY docker/service_conf.yaml.template ./conf/service_conf.yaml.template
126
  COPY docker/entrypoint.sh ./entrypoint.sh
127
  RUN chmod +x ./entrypoint.sh
128
 
README.md CHANGED
@@ -216,7 +216,7 @@ releases! 🌟
216
  5. In your web browser, enter the IP address of your server and log in to RAGFlow.
217
  > With the default settings, you only need to enter `http://IP_OF_YOUR_MACHINE` (**sans** port number) as the default
218
  HTTP serving port `80` can be omitted when using the default configurations.
219
- 6. In [service_conf.yaml](./docker/service_conf.yaml), select the desired LLM factory in `user_default_llm` and update
220
  the `API_KEY` field with the corresponding API key.
221
 
222
  > See [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup) for more information.
@@ -229,16 +229,11 @@ When it comes to system configurations, you will need to manage the following fi
229
 
230
  - [.env](./docker/.env): Keeps the fundamental setups for the system, such as `SVR_HTTP_PORT`, `MYSQL_PASSWORD`, and
231
  `MINIO_PASSWORD`.
232
- - [service_conf.yaml](./docker/service_conf.yaml): Configures the back-end services.
233
- - [docker-compose.yml](./docker/docker-compose.yml): The system relies
234
- on [docker-compose.yml](./docker/docker-compose.yml) to start up.
235
-
236
- 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.
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
240
- > the [./docker/README](./docker/README.md) file are aligned with the corresponding configurations in
241
- > the [service_conf.yaml](./docker/service_conf.yaml) file.
242
 
243
  To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80`
244
  to `<YOUR_SERVING_PORT>:80`.
@@ -293,11 +288,11 @@ docker build -f Dockerfile -t infiniflow/ragflow:dev .
293
  docker compose -f docker/docker-compose-base.yml up -d
294
  ```
295
 
296
- Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/service_conf.yaml** to `127.0.0.1`:
297
  ```
298
  127.0.0.1 es01 infinity mysql minio redis
299
  ```
300
- In **docker/service_conf.yaml**, update mysql port to `5455` and es port to `1200`, as specified in **docker/.env**.
301
 
302
  4. If you cannot access HuggingFace, set the `HF_ENDPOINT` environment variable to use a mirror site:
303
 
 
216
  5. In your web browser, enter the IP address of your server and log in to RAGFlow.
217
  > With the default settings, you only need to enter `http://IP_OF_YOUR_MACHINE` (**sans** port number) as the default
218
  HTTP serving port `80` can be omitted when using the default configurations.
219
+ 6. In [service_conf.yaml.template](./docker/service_conf.yaml.template), select the desired LLM factory in `user_default_llm` and update
220
  the `API_KEY` field with the corresponding API key.
221
 
222
  > See [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup) for more information.
 
229
 
230
  - [.env](./docker/.env): Keeps the fundamental setups for the system, such as `SVR_HTTP_PORT`, `MYSQL_PASSWORD`, and
231
  `MINIO_PASSWORD`.
232
+ - [service_conf.yaml.template](./docker/service_conf.yaml.template): Configures the back-end services. The environment variables in this file will be automatically populated when the Docker container starts. Any environment variables set within the Docker container will be available for use, allowing you to customize service behavior based on the deployment environment.
233
+ - [docker-compose.yml](./docker/docker-compose.yml): The system relies on [docker-compose.yml](./docker/docker-compose.yml) to start up.
 
 
 
234
 
235
  > The [./docker/README](./docker/README.md) file provides a detailed description of the environment settings and service
236
+ > configurations which can be used as `${ENV_VARS}` in the [service_conf.yaml.template](./docker/service_conf.yaml.template) file.
 
 
237
 
238
  To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80`
239
  to `<YOUR_SERVING_PORT>:80`.
 
288
  docker compose -f docker/docker-compose-base.yml up -d
289
  ```
290
 
291
+ Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/.env** to `127.0.0.1`:
292
  ```
293
  127.0.0.1 es01 infinity mysql minio redis
294
  ```
295
+ In **docker/service_conf.yaml.template**, update mysql port to `5455` and es port to `1200`, as specified in **docker/.env**.
296
 
297
  4. If you cannot access HuggingFace, set the `HF_ENDPOINT` environment variable to use a mirror site:
298
 
docker/.env CHANGED
@@ -1,6 +1,9 @@
1
  # The version of Elasticsearch.
2
  STACK_VERSION=8.11.3
3
 
 
 
 
4
  # The port used to expose the Elasticsearch service to the host machine,
5
  # allowing EXTERNAL access to the service running inside the Docker container.
6
  ES_PORT=1200
@@ -27,10 +30,16 @@ INFINITY_PSQL_PORT=5432
27
  # The password for MySQL.
28
  # When updated, you must revise the `mysql.password` entry in service_conf.yaml.
29
  MYSQL_PASSWORD=infini_rag_flow
 
 
 
 
30
  # The port used to expose the MySQL service to the host machine,
31
  # allowing EXTERNAL access to the MySQL database running inside the Docker container.
32
  MYSQL_PORT=5455
33
 
 
 
34
  # The port used to expose the MinIO console interface to the host machine,
35
  # allowing EXTERNAL access to the web-based console running inside the Docker container.
36
  MINIO_CONSOLE_PORT=9001
@@ -44,6 +53,8 @@ MINIO_USER=rag_flow
44
  # When updated, you must revise the `minio.password` entry in service_conf.yaml accordingly.
45
  MINIO_PASSWORD=infini_rag_flow
46
 
 
 
47
  # The port used to expose the Redis service to the host machine,
48
  # allowing EXTERNAL access to the Redis service running inside the Docker container.
49
  REDIS_PORT=6379
 
1
  # The version of Elasticsearch.
2
  STACK_VERSION=8.11.3
3
 
4
+ # The hostname where the Elasticsearch service is exposed
5
+ ES_HOST=es01
6
+
7
  # The port used to expose the Elasticsearch service to the host machine,
8
  # allowing EXTERNAL access to the service running inside the Docker container.
9
  ES_PORT=1200
 
30
  # The password for MySQL.
31
  # When updated, you must revise the `mysql.password` entry in service_conf.yaml.
32
  MYSQL_PASSWORD=infini_rag_flow
33
+ # The hostname where the MySQL service is exposed
34
+ MYSQL_HOST=mysql
35
+ # The database of the MySQL service to use
36
+ MYSQL_DBNAME=rag_flow
37
  # The port used to expose the MySQL service to the host machine,
38
  # allowing EXTERNAL access to the MySQL database running inside the Docker container.
39
  MYSQL_PORT=5455
40
 
41
+ # The hostname where the MySQL service is exposed
42
+ MINIO_HOST=minio
43
  # The port used to expose the MinIO console interface to the host machine,
44
  # allowing EXTERNAL access to the web-based console running inside the Docker container.
45
  MINIO_CONSOLE_PORT=9001
 
53
  # When updated, you must revise the `minio.password` entry in service_conf.yaml accordingly.
54
  MINIO_PASSWORD=infini_rag_flow
55
 
56
+ # The hostname where the Redis service is exposed
57
+ REDIS_HOST=redis
58
  # The port used to expose the Redis service to the host machine,
59
  # allowing EXTERNAL access to the Redis service running inside the Docker container.
60
  REDIS_PORT=6379
docker/README.md CHANGED
@@ -27,7 +27,7 @@ The [.env](./.env) file contains important environment variables for Docker.
27
  - `ES_PORT`
28
  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`.
29
  - `ELASTIC_PASSWORD`
30
- The password for Elasticsearch. When updated, you must revise the `es.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
31
 
32
  ### Kibana
33
 
@@ -46,7 +46,7 @@ The [.env](./.env) file contains important environment variables for Docker.
46
  ### MySQL
47
 
48
  - `MYSQL_PASSWORD`
49
- The password for MySQL. When updated, you must revise the `mysql.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
50
  - `MYSQL_PORT`
51
  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`.
52
 
@@ -57,16 +57,16 @@ The [.env](./.env) file contains important environment variables for Docker.
57
  - `MINIO_PORT`
58
  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`.
59
  - `MINIO_USER`
60
- The username for MinIO. When updated, you must revise the `minio.user` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
61
  - `MINIO_PASSWORD`
62
- The password for MinIO. When updated, you must revise the `minio.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
63
 
64
  ### Redis
65
 
66
  - `REDIS_PORT`
67
  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`.
68
  - `REDIS_PASSWORD`
69
- The password for Redis. When updated, you must revise the `redis.password` entry in [service_conf.yaml](./service_conf.yaml) accordingly.
70
 
71
  ### RAGFlow
72
 
@@ -119,7 +119,7 @@ The [.env](./.env) file contains important environment variables for Docker.
119
 
120
  ## 🐋 Service configuration
121
 
122
- [service_conf.yaml](./service_conf.yaml) specifies the system-level configuration for RAGFlow and is used by its API server and task executor.
123
 
124
  - `ragflow`
125
  - `host`: The API server's IP address inside the Docker container. Defaults to `0.0.0.0`.
@@ -139,11 +139,11 @@ The [.env](./.env) file contains important environment variables for Docker.
139
  - `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
140
 
141
  - `oauth`
142
- 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**.
143
  - `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.
144
 
145
  - `user_default_llm`
146
- 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**.
147
  - `factory`: The LLM supplier. Available options:
148
  - `"OpenAI"`
149
  - `"DeepSeek"`
 
27
  - `ES_PORT`
28
  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`.
29
  - `ELASTIC_PASSWORD`
30
+ The password for Elasticsearch.
31
 
32
  ### Kibana
33
 
 
46
  ### MySQL
47
 
48
  - `MYSQL_PASSWORD`
49
+ The password for MySQL.
50
  - `MYSQL_PORT`
51
  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`.
52
 
 
57
  - `MINIO_PORT`
58
  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`.
59
  - `MINIO_USER`
60
+ The username for MinIO.
61
  - `MINIO_PASSWORD`
62
+ The password for MinIO.
63
 
64
  ### Redis
65
 
66
  - `REDIS_PORT`
67
  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`.
68
  - `REDIS_PASSWORD`
69
+ The password for Redis.
70
 
71
  ### RAGFlow
72
 
 
119
 
120
  ## 🐋 Service configuration
121
 
122
+ [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).
123
 
124
  - `ragflow`
125
  - `host`: The API server's IP address inside the Docker container. Defaults to `0.0.0.0`.
 
139
  - `host`: The MinIO serving IP *and* port inside the Docker container. Defaults to `minio:9000`.
140
 
141
  - `oauth`
142
+ 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**.
143
  - `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.
144
 
145
  - `user_default_llm`
146
+ 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**.
147
  - `factory`: The LLM supplier. Available options:
148
  - `"OpenAI"`
149
  - `"DeepSeek"`
docker/docker-compose-gpu.yml CHANGED
@@ -16,7 +16,6 @@ services:
16
  - 80:80
17
  - 443:443
18
  volumes:
19
- - ./service_conf.yaml:/ragflow/conf/service_conf.yaml
20
  - ./ragflow-logs:/ragflow/logs
21
  - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
22
  - ./nginx/proxy.conf:/etc/nginx/proxy.conf
 
16
  - 80:80
17
  - 443:443
18
  volumes:
 
19
  - ./ragflow-logs:/ragflow/logs
20
  - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
21
  - ./nginx/proxy.conf:/etc/nginx/proxy.conf
docker/entrypoint.sh CHANGED
@@ -1,5 +1,12 @@
1
  #!/bin/bash
2
 
 
 
 
 
 
 
 
3
  # unset http proxy which maybe set by docker daemon
4
  export http_proxy=""; export https_proxy=""; export no_proxy=""; export HTTP_PROXY=""; export HTTPS_PROXY=""; export NO_PROXY=""
5
 
 
1
  #!/bin/bash
2
 
3
+ # replace env variables in the service_conf.yaml file
4
+ rm -rf /ragflow/conf/service_conf.yaml
5
+ while IFS= read -r line || [[ -n "$line" ]]; do
6
+ # Use eval to interpret the variable with default values
7
+ eval "echo \"$line\"" >> /ragflow/conf/service_conf.yaml
8
+ done < /ragflow/conf/service_conf.yaml.template
9
+
10
  # unset http proxy which maybe set by docker daemon
11
  export http_proxy=""; export https_proxy=""; export no_proxy=""; export HTTP_PROXY=""; export HTTPS_PROXY=""; export NO_PROXY=""
12
 
docker/service_conf.yaml.template ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ragflow:
2
+ host: ${RAGFLOW_HOST:-0.0.0.0}
3
+ http_port: 9380
4
+ mysql:
5
+ name: '${MYSQL_DBNAME:-rag_flow}'
6
+ user: '${MYSQL_USER:-root}'
7
+ password: '${MYSQL_PASSWORD:-infini_rag_flow}'
8
+ host: '${MYSQL_HOST:-mysql}'
9
+ port: 3306
10
+ max_connections: 100
11
+ stale_timeout: 30
12
+ minio:
13
+ user: '${MINIO_USER:-rag_flow}'
14
+ password: '${MINIO_PASSWORD:-infini_rag_flow}'
15
+ host: '${MINIO_HOST:-minio}:9000'
16
+ es:
17
+ hosts: 'http://${ES_HOST:-es01}:9200'
18
+ username: '${ES_USER:-elastic}'
19
+ password: '${ES_PASSWORD:-infini_rag_flow}'
20
+ redis:
21
+ db: 1
22
+ password: '${REDIS_PASSWORD:-infini_rag_flow}'
23
+ host: '${REDIS_HOST:-redis}:6379'
24
+
25
+ # postgres:
26
+ # name: '${POSTGRES_DBNAME:-rag_flow}'
27
+ # user: '${POSTGRES_USER:-rag_flow}'
28
+ # password: '${POSTGRES_PASSWORD:-infini_rag_flow}'
29
+ # host: '${POSTGRES_HOST:-postgres}'
30
+ # port: 5432
31
+ # max_connections: 100
32
+ # stale_timeout: 30
33
+ # s3:
34
+ # endpoint: 'endpoint'
35
+ # access_key: 'access_key'
36
+ # secret_key: 'secret_key'
37
+ # region: 'region'
38
+ # azure:
39
+ # auth_type: 'sas'
40
+ # container_url: 'container_url'
41
+ # sas_token: 'sas_token'
42
+ # azure:
43
+ # auth_type: 'spn'
44
+ # account_url: 'account_url'
45
+ # client_id: 'client_id'
46
+ # secret: 'secret'
47
+ # tenant_id: 'tenant_id'
48
+ # container_name: 'container_name'
49
+ # user_default_llm:
50
+ # factory: 'Tongyi-Qianwen'
51
+ # api_key: 'sk-xxxxxxxxxxxxx'
52
+ # base_url: ''
53
+ # oauth:
54
+ # github:
55
+ # client_id: xxxxxxxxxxxxxxxxxxxxxxxxx
56
+ # secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
57
+ # url: https://github.com/login/oauth/access_token
58
+ # feishu:
59
+ # app_id: cli_xxxxxxxxxxxxxxxxxxx
60
+ # app_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
61
+ # app_access_token_url: https://open.feishu.cn/open-apis/auth/v3/app_access_token/internal
62
+ # user_access_token_url: https://open.feishu.cn/open-apis/authen/v1/oidc/access_token
63
+ # grant_type: 'authorization_code'
64
+ # authentication:
65
+ # client:
66
+ # switch: false
67
+ # http_app_key:
68
+ # http_secret_key:
69
+ # site:
70
+ # switch: false
71
+ # permission:
72
+ # switch: false
73
+ # component: false
74
+ # dataset: false
docs/configurations.md CHANGED
@@ -12,11 +12,9 @@ Configurations for installing RAGFlow via Docker.
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
 
@@ -47,7 +45,7 @@ The [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) file con
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
 
@@ -66,7 +64,7 @@ The [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) file con
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
 
@@ -77,16 +75,16 @@ The [.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env) file con
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
 
@@ -140,7 +138,7 @@ If you cannot download the RAGFlow Docker image, try the following mirrors.
140
 
141
  ## Service configuration
142
 
143
- [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.
144
 
145
  ### `ragflow`
146
 
@@ -164,13 +162,13 @@ If you cannot download the RAGFlow Docker image, try the following mirrors.
164
 
165
  ### `oauth`
166
 
167
- 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**.
168
 
169
  - `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.
170
 
171
  ### `user_default_llm`
172
 
173
- 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**.
174
 
175
  - `factory`: The LLM supplier. Available options:
176
  - `"OpenAI"`
 
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.template](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml.template): Configures the back-end services. It specifies the system-level configuration for RAGFlow and is used by its API server and task executor. Upon container startup, the `service_conf.yaml` file will be generated based on this template file. This process replaces any environment variables within the template, allowing for dynamic configuration tailored to the container's environment.
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
  To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80`
19
  to `<YOUR_SERVING_PORT>:80`.
20
 
 
45
  - `ES_PORT`
46
  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`.
47
  - `ELASTIC_PASSWORD`
48
+ The password for Elasticsearch.
49
 
50
  ### Kibana
51
 
 
64
  ### MySQL
65
 
66
  - `MYSQL_PASSWORD`
67
+ The password for MySQL.
68
  - `MYSQL_PORT`
69
  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`.
70
 
 
75
  - `MINIO_PORT`
76
  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`.
77
  - `MINIO_USER`
78
+ The username for MinIO.
79
  - `MINIO_PASSWORD`
80
+ The password for MinIO. accordingly.
81
 
82
  ### Redis
83
 
84
  - `REDIS_PORT`
85
  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`.
86
  - `REDIS_PASSWORD`
87
+ The password for Redis.
88
 
89
  ### RAGFlow
90
 
 
138
 
139
  ## Service configuration
140
 
141
+ [service_conf.yaml.template](https://github.com/infiniflow/ragflow/blob/main/docker/service_conf.yaml.template) specifies the system-level configuration for RAGFlow and is used by its API server and task executor.
142
 
143
  ### `ragflow`
144
 
 
162
 
163
  ### `oauth`
164
 
165
+ 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**.
166
 
167
  - `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.
168
 
169
  ### `user_default_llm`
170
 
171
+ 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**.
172
 
173
  - `factory`: The LLM supplier. Available options:
174
  - `"OpenAI"`
docs/guides/develop/launch_ragflow_from_source.md CHANGED
@@ -64,13 +64,13 @@ docker compose -f docker/docker-compose-base.yml up -d
64
 
65
  ### Update `host` and `port` Settings for Third-party Services
66
 
67
- 1. Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/service_conf.yaml** to `127.0.0.1`:
68
 
69
  ```
70
  127.0.0.1 es01 infinity mysql minio redis
71
  ```
72
 
73
- 2. In **docker/service_conf.yaml**, update mysql port to `5455` and es port to `1200`, as specified in **docker/.env**.
74
 
75
  ### Launch the RAGFlow Backend Service
76
 
 
64
 
65
  ### Update `host` and `port` Settings for Third-party Services
66
 
67
+ 1. Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/service_conf.yaml.template** to `127.0.0.1`:
68
 
69
  ```
70
  127.0.0.1 es01 infinity mysql minio redis
71
  ```
72
 
73
+ 2. In **docker/service_conf.yaml.template**, update mysql port to `5455` and es port to `1200`, as specified in **docker/.env**.
74
 
75
  ### Launch the RAGFlow Backend Service
76
 
docs/guides/llm_api_key_setup.md CHANGED
@@ -19,7 +19,7 @@ If you find your online LLM is not on the list, don't feel disheartened. The lis
19
 
20
  You have two options for configuring your model API key:
21
 
22
- - Configure it in **service_conf.yaml** before starting RAGFlow.
23
  - Configure it on the **Model Providers** page after logging into RAGFlow.
24
 
25
  ### Configure model API key before starting up RAGFlow
@@ -37,7 +37,7 @@ You have two options for configuring your model API key:
37
  ### Configure model API key after logging into RAGFlow
38
 
39
  :::caution WARNING
40
- After logging into RAGFlow, configuring your model API key through the **service_conf.yaml** file will no longer take effect.
41
  :::
42
 
43
  After logging into RAGFlow, you can *only* configure API Key on the **Model Providers** page:
 
19
 
20
  You have two options for configuring your model API key:
21
 
22
+ - Configure it in **service_conf.yaml.template** before starting RAGFlow.
23
  - Configure it on the **Model Providers** page after logging into RAGFlow.
24
 
25
  ### Configure model API key before starting up RAGFlow
 
37
  ### Configure model API key after logging into RAGFlow
38
 
39
  :::caution WARNING
40
+ After logging into RAGFlow, configuring your model API key through the **service_conf.yaml.template** file will no longer take effect.
41
  :::
42
 
43
  After logging into RAGFlow, you can *only* configure API Key on the **Model Providers** page: