From e550b5b2f1effecb22cdc12e31bd65acc16ebddf Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Wed, 2 Sep 2026 23:05:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(newapi):=20=E5=88=87=E6=8D=A2=20Redis=20?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E4=B8=BA=E6=97=A0=E5=AF=86=E7=A0=81=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- newapi/env.cfg.example | 1 + newapi/stack.host.yml | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/newapi/env.cfg.example b/newapi/env.cfg.example index 615150b..bb6a719 100644 --- a/newapi/env.cfg.example +++ b/newapi/env.cfg.example @@ -43,6 +43,7 @@ DB_USER=newapi DB_PASSWORD= # ---------- Redis(容器内 Redis)---------- +REDIS_HOST=redis REDIS_PASSWORD= # ---------- new-api 应用 ---------- diff --git a/newapi/stack.host.yml b/newapi/stack.host.yml index c5f7547..e9d18a1 100644 --- a/newapi/stack.host.yml +++ b/newapi/stack.host.yml @@ -29,7 +29,8 @@ services: # - SQL_DSN=postgresql://${DB_USER:-newapi}:${DB_PASSWORD}@${DB_HOST:-postgres}:${DB_PORT:-5432}/${DB_NAME:-new_api}?sslmode=disable - SQL_DSN=postgresql://${DB_USER:-newapi}:${DB_PASSWORD}@${DB_HOST:-postgres}:${DB_PORT:-5432}/${DB_NAME:-new_api} # 默认值:REDIS_HOST=172.22.10.205 指向 Dev-Redis(dbSer/redis.yml部署,DevNet 网段固定 IP) - - REDIS_CONN_STRING=redis://:${REDIS_PASSWORD}@${REDIS_HOST:-172.22.10.205}:${REDIS_PORT:-6379} + # - REDIS_CONN_STRING=redis://:${REDIS_PASSWORD}@${REDIS_HOST:-172.22.10.205}:${REDIS_PORT:-6379} + - REDIS_CONN_STRING=redis://${REDIS_HOST:-172.22.10.205}:${REDIS_PORT:-6379} - TZ=Asia/Shanghai - BATCH_UPDATE_ENABLED=true - ERROR_LOG_ENABLED=true @@ -49,4 +50,4 @@ networks: prod-dbs_default: # 引用 prod-dbs 项目自动创建的默认网络,不归本 compose 管 external: true - name: prod-dbs_default \ No newline at end of file + name: prod-dbs_default