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