更新 dockerfile
Server CI/CD / docker-image (push) Failing after 11s
Server CI/CD / deploy-fallback-log (push) Successful in 0s

This commit is contained in:
2026-06-10 11:45:22 +08:00
parent 4fa8e55748
commit f35287d3cf
2 changed files with 6 additions and 5 deletions
+4 -3
View File
@@ -14,10 +14,11 @@ COPY requirements.txt .
RUN pip install --no-cache-dir uv
RUN uv pip install --system --no-cache-dir -r requirements.txt
# 将代码放入子目录 'app'临时数据目录运行时创建。
# db_inp 和 .env 都不应依赖 Git 跟踪或被烘焙进镜像。
# 将代码放入子目录 'app'将数据放入子目录 'db_inp'
# 这样临时文件默认会生成在 /app 下,而代码在 /app/app 下,实现了分离
COPY app ./app
RUN mkdir -p ./db_inp
COPY db_inp ./db_inp
COPY .env .
# 设置 PYTHONPATH 以便 uvicorn 找到 app 模块
ENV PYTHONPATH=/app