FROM python:3.12-slim

WORKDIR /app

# 先复制依赖文件，利用 Docker 缓存加速构建
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

# 再复制项目代码
COPY . .

EXPOSE 8005

CMD ["python", "app.py"]
