大幅增加超时时间, 增加重命名机制

This commit is contained in:
2025-12-27 10:45:21 +08:00
parent f0d1343955
commit 61b5205503
5 changed files with 325 additions and 37 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM python:3.11-slim-bookworm
# 设置环境变量,确保 Python 输出为 UTF-8
ENV PYTHONIOENCODING=utf-8
ENV LANG C.UTF-8
# 设置工作目录
WORKDIR /app
# 复制依赖文件并安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制所有的应用程序代码到工作目录
COPY bot.py .
# 声明存储目录为一个卷
# 这表明 /app/local_storage 路径下的数据应该被持久化
# 注意:实际的路径将由 bot.py 中的 STORAGE_DIR 环境变量决定
# 我们在这里声明默认值
VOLUME /app/local_storage
CMD ["python", "bot.py"]