问题原因: - 部署脚本使用 POSTGRES_PASSWORD 环境变量 - Go 代码使用 MPC_DATABASE_PASSWORD 环境变量 (Viper 前缀) - 变量名不匹配导致数据库认证失败 修复内容: - configure_postgres() 改用 MPC_DATABASE_* 环境变量 - 添加 pg_hba.conf 配置,将 peer/scram-sha-256 改为 md5 认证 - 添加 GRANT ALL ON SCHEMA public 权限 - 使用 127.0.0.1 而非 localhost 进行连接 - 新增 reconfigure 命令用于修复现有安装 服务器修复步骤: sudo ./scripts/deploy.sh reconfigure sudo ./scripts/deploy.sh restart 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| deploy.sh | ||