fix: 修复 docker-compose.yml 中 PostgreSQL 配置问题
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m57s

问题:
- docker-compose.yml 中 DB_HOST 被硬编码为 'ai-postgres',导致无法连接到远程 PostgreSQL 服务器
- 其他数据库配置也被硬编码,没有使用 .env 文件中的配置

修复:
- 将所有 PostgreSQL 配置改为从 .env 文件读取
- 添加 DB_URI 环境变量传递
This commit is contained in:
2026-05-01 00:55:41 +08:00
parent f3bcb01777
commit 598f40ef74

View File

@@ -15,11 +15,12 @@ services:
# ========================================================================= # =========================================================================
# PostgreSQL 数据库配置 # PostgreSQL 数据库配置
# ========================================================================= # =========================================================================
- DB_HOST=ai-postgres - DB_HOST=${DB_HOST}
- DB_PORT=5432 - DB_PORT=${DB_PORT}
- DB_USER=postgres - DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD:?请配置 DB_PASSWORD本地.env 文件 | CI/CDSecrets} # ⭐ 敏感密钥配置 - DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=langgraph_db - DB_NAME=${DB_NAME}
- DB_URI=${DB_URI}
# ========================================================================= # =========================================================================
# Qdrant 向量数据库配置URL + API密钥 配对) # Qdrant 向量数据库配置URL + API密钥 配对)