From cd03ec9b84c344aeeb28f26e625876eba09ab469 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Mon, 8 Jun 2026 05:29:09 +0800 Subject: [PATCH] =?UTF-8?q?chore(hindsight):=20=E6=9B=B4=E6=96=B0PG?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E5=8F=8A=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 scram-sha-256 认证方式及初始化参数 - 新增 DB 端口和 dataplane API URL 变量 - 移除 huggingface 缓存卷挂载 - 修正 LLM provider 值为小写 minimax --- hindsight/env.cfg.example | 6 +++++- hindsight/stack.yml | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hindsight/env.cfg.example b/hindsight/env.cfg.example index e8e9b2b..9558538 100644 --- a/hindsight/env.cfg.example +++ b/hindsight/env.cfg.example @@ -14,6 +14,7 @@ HINDSIGHT_APP_IMAGE=ghcr.nju.edu.cn/vectorize-io/hindsight # 数据库账号/库名 HINDSIGHT_DB_USER=hindsight_user HINDSIGHT_DB_NAME=hindsight_db +POSTGRES_HOST_AUTH_METHOD=scram-sha-256 # 宿主机数据卷路径(**必须 WSL/Linux ext4 原生 fs**,不能放 /mnt/9P) # bind 挂载 PostgreSQL 数据;放在 ~/hindsight/pgdata 而非 /mnt/d/mydata/, @@ -21,11 +22,13 @@ HINDSIGHT_DB_NAME=hindsight_db Volumes_Path=/data/Volumes/hindsight # 服务端口(宿主机:容器) +HINDSIGHT_DB_PORT=5432 HINDSIGHT_API_PORT=8888 HINDSIGHT_ADMIN_PORT=9999 +HINDSIGHT_CP_DATAPLANE_API_URL=http://0.0.0.0:8888 # LLM(MiniMax OpenAI-compatible 协议) -HINDSIGHT_API_LLM_PROVIDER=MiniMax-CN +HINDSIGHT_API_LLM_PROVIDER=minimax HINDSIGHT_API_LLM_MODEL=MiniMax-M3 HINDSIGHT_API_LLM_BASE_URL=https://api.minimaxi.com/v1 @@ -34,6 +37,7 @@ HINDSIGHT_API_LOG_LEVEL=info # ============================================================ # 敏感值(必填,env.cfg 不提交)— 在 .gitignore 已忽略 +# PostgreSQL 密码 最好不要带特殊字符 # ============================================================ # HINDSIGHT_DB_PASSWORD=<强密码> # HINDSIGHT_API_LLM_API_KEY=<你的 MiniMax key> diff --git a/hindsight/stack.yml b/hindsight/stack.yml index 92a4e1f..a730258 100644 --- a/hindsight/stack.yml +++ b/hindsight/stack.yml @@ -24,7 +24,8 @@ services: - POSTGRES_USER=${HINDSIGHT_DB_USER:-hindsight_user} - POSTGRES_PASSWORD=${HINDSIGHT_DB_PASSWORD:?set HINDSIGHT_DB_PASSWORD} - POSTGRES_DB=${HINDSIGHT_DB_NAME:-hindsight_db} - - POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C + - POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD} + - POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C --auth-host=${POSTGRES_HOST_AUTH_METHOD} volumes: - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro @@ -61,13 +62,12 @@ services: - HINDSIGHT_API_LLM_BASE_URL=${HINDSIGHT_API_LLM_BASE_URL} - HINDSIGHT_API_DATABASE_URL=postgresql://${HINDSIGHT_DB_USER}:${HINDSIGHT_DB_PASSWORD}@db:5432/${HINDSIGHT_DB_NAME} - HINDSIGHT_API_LOG_LEVEL=${HINDSIGHT_API_LOG_LEVEL:-info} + - HINDSIGHT_CP_DATAPLANE_API_URL=${HINDSIGHT_CP_DATAPLANE_API_URL} - HF_HUB_OFFLINE=1 - TRANSFORMERS_OFFLINE=1 volumes: - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro - # 复用宿主 HF 缓存,bge + ms-marco 不重下 - - ${Volumes_Path}/huggingface:/home/hindsight/.cache/huggingface - ${Volumes_Path}/backups:/home/hindsight/backups networks: - hindsight-net