迁移 psycopg3 并修复 Postgres 18 兼容性问题

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
fish
2026-05-03 15:29:08 +08:00
parent 961ab8224e
commit d3ec1de275
5 changed files with 24 additions and 17 deletions

View File

@@ -9,8 +9,8 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
WORKDIR /app
# 运行时依赖 + 时区 + libpq(psycopg2)
RUN apk add --no-cache tzdata libpq \
# 时区(psycopg[binary] wheel 自带 libpq,不再需要系统装 libpq)
RUN apk add --no-cache tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone