密钥写死,处理报错

This commit is contained in:
2025-08-18 22:39:34 +08:00
parent 23a5c907f7
commit cc8d488bd9
11 changed files with 1452 additions and 367 deletions

26
Dockerfile.log-manager Normal file
View File

@@ -0,0 +1,26 @@
FROM python:3.12-slim
# 设置工作目录
WORKDIR /app
# 复制日志管理相关文件
COPY log_manager.py .
COPY requirements.txt .
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
# 创建日志目录
RUN mkdir -p /app/logs
# 设置环境变量
ENV PYTHONPATH=/app
# 创建定时任务
RUN echo "0 2 * * * cd /app && python log_manager.py" > /etc/cron.d/log-maintenance
# 安装cron
RUN apt-get update && apt-get install -y cron && rm -rf /var/lib/apt/lists/*
# 启动cron和日志管理
CMD ["sh", "-c", "cron && python log_manager.py"]