Files
fquiz/memory/2026-04-30.md
T
2026-04-30 07:49:32 +08:00

31 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Work Log - Docker PostgreSQL 默认端口切换为 54342026-04-30
- 背景:
- 用户要求将 Docker 镜像构建/部署链路中的 PostgreSQL 默认宿主机端口改为 `5434`
- 本次改动:
- `docker-compose.yml`
- `db.ports` 默认映射从 `${POSTGRES_PORT:-5433}:5432` 改为 `${POSTGRES_PORT:-5434}:5432`
- `.env`
- `POSTGRES_PORT=5434`
- `.env.example`
- `DB_PORT=5434`(本机直连口径)。
- `POSTGRES_PORT=5434`(容器暴露口径)。
- `.github/workflows/main.yml`
- 部署阶段生成的 `docker-compose.prod.yml` 默认映射改为 `${POSTGRES_PORT:-5434}:5432`
- 自动生成 `.env` 模板中的 `POSTGRES_PORT=5434`
- `api/app/core/config.py`
- 本机默认 `db_port``5433` 改为 `5434`,与新口径一致。
- `README.md`
- 本地 PostgreSQL 可选端口说明从 `localhost:5433` 更新为 `localhost:5434`
- `MEMORY.md`
- 长期端口口径同步更新为 `5434`
- 验证:
- 通过 `rg` 全局检索 `POSTGRES_PORT/5433` 相关配置,确认运行口径已切换到 `5434`
- 本次未执行容器重建或运行态联调。
- 风险与影响:
- 影响范围:Docker 暴露端口与本机直连默认端口。
- 若已有外部脚本/客户端固定连接 `5433`,需同步改为 `5434` 或显式覆盖 `POSTGRES_PORT/DB_PORT`