From 2d9538c324ae25e415ce369cd463cdae8fe34c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=B1=BC=E5=BC=80=E5=8F=91?= Date: Fri, 8 May 2026 13:51:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(docker):=20Dockerfile=20=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=20alembic.ini=20=E5=92=8C=20alembic/=20=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=88=B0=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit api 服务启动命令包含 alembic upgrade head, 需要在镜像中包含 alembic 配置文件和迁移脚本。 --- python-api/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-api/Dockerfile b/python-api/Dockerfile index 8ceb2f1..b799c54 100644 --- a/python-api/Dockerfile +++ b/python-api/Dockerfile @@ -39,6 +39,8 @@ WORKDIR /app # 复制应用代码和配置 COPY app/ ./app/ COPY config/ ./config/ +COPY alembic.ini . +COPY alembic/ ./alembic/ COPY pyproject.toml . EXPOSE 8000