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