From 94953687c1e2f6156e0e92f5787655fc1aeb1cfd Mon Sep 17 00:00:00 2001 From: zstar <65890619+zstar1003@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:43:07 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4=E5=92=8CDocker=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将axios请求超时时间从50000毫秒调整为10000毫秒,优化请求响应速度。同时,更新Docker配置文件,添加容器重启策略和额外主机配置,提高服务稳定性和网络访问能力。 --- docker/.env | 2 +- docker/docker-compose.yml | 8 ++++++-- docker/docker-compose_gpu.yml | 8 ++++++-- management/web/src/http/axios.ts | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docker/.env b/docker/.env index 9383c8e..56c7cc6 100644 --- a/docker/.env +++ b/docker/.env @@ -73,7 +73,7 @@ REDIS_PASSWORD=infini_rag_flow SVR_HTTP_PORT=9380 -# 镜像名称变更为zstar1003/ragflowplus:v0.2.1 +# 镜像名称变更为zstar1003/ragflowplus:v0.2.1,原始为infiniflow/ragflow:v0.18.0-slim RAGFLOW_IMAGE=zstar1003/ragflowplus:v0.2.1 RAGFLOWPLUS_MANAGEMENT_WEB_IMAGE=zstar1003/ragflowplus-management-web:v0.2.1 RAGFLOWPLUS_MANAGEMENT_SERVER_IMAGE=zstar1003/ragflowplus-management-server:v0.2.1 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 13e16c8..21dbf7e 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -42,6 +42,9 @@ services: - API_BASE_URL=/api networks: - ragflow + restart: on-failure + extra_hosts: + - "host.docker.internal:host-gateway" # 后台信息管理系统后端 management-backend: @@ -62,10 +65,11 @@ services: - MANAGEMENT_ADMIN_USERNAME=${MANAGEMENT_ADMIN_USERNAME:-admin} - MANAGEMENT_ADMIN_PASSWORD=${MANAGEMENT_ADMIN_PASSWORD:-12345678} - MANAGEMENT_JWT_SECRET=${MANAGEMENT_JWT_SECRET:-12345678} - extra_hosts: - - "host.docker.internal:host-gateway" networks: - ragflow + restart: on-failure + extra_hosts: + - "host.docker.internal:host-gateway" # # vllm 嵌入模型 # vllm-bge: diff --git a/docker/docker-compose_gpu.yml b/docker/docker-compose_gpu.yml index 8761626..686de3a 100644 --- a/docker/docker-compose_gpu.yml +++ b/docker/docker-compose_gpu.yml @@ -42,6 +42,9 @@ services: - API_BASE_URL=/api networks: - ragflow + restart: on-failure + extra_hosts: + - "host.docker.internal:host-gateway" # 后台信息管理系统后端 management-backend: @@ -62,10 +65,11 @@ services: - MANAGEMENT_ADMIN_USERNAME=${MANAGEMENT_ADMIN_USERNAME:-admin} - MANAGEMENT_ADMIN_PASSWORD=${MANAGEMENT_ADMIN_PASSWORD:-12345678} - MANAGEMENT_JWT_SECRET=${MANAGEMENT_JWT_SECRET:-12345678} - extra_hosts: - - "host.docker.internal:host-gateway" networks: - ragflow + restart: on-failure + extra_hosts: + - "host.docker.internal:host-gateway" deploy: resources: reservations: diff --git a/management/web/src/http/axios.ts b/management/web/src/http/axios.ts index 560ce64..6ed2c2e 100644 --- a/management/web/src/http/axios.ts +++ b/management/web/src/http/axios.ts @@ -116,7 +116,7 @@ function createRequest(instance: AxiosInstance) { // 请求体 data: {}, // 请求超时 - timeout: 50000, + timeout: 10000, // 跨域请求时是否携带 Cookies withCredentials: false }