fix:优化数据

This commit is contained in:
丹尼尔
2026-03-15 16:38:59 +08:00
parent a609f81a36
commit 3aa1a586e5
43 changed files with 14565 additions and 294 deletions

View File

@@ -1,14 +1,19 @@
# 分层构建:依赖与代码分离,仅代码变更时只重建最后一层,加快迭代
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim
ENV MODULE_NAME=backend.app.main
ENV VARIABLE_NAME=app
ENV PORT=8000
ENV HOST=0.0.0.0
# SQLite 对并发写不友好,单 worker 避免多进程竞争
ENV WEB_CONCURRENCY=1
WORKDIR /app
# 依赖层:只有 requirements 变更时才重建
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# 代码层:仅此层会随业务代码变更而重建
COPY backend /app/backend