Files
etf/Dockerfile
aszerW 4791d3cf40 refactor(scheduler): move daily_scheduler.py to rotation/ and add simple_rotation support
- Move scripts/daily_scheduler.py -> rotation/daily_scheduler.py
- Add run_simple_rotation() to execute simple_rotation.py via subprocess
- Add --strategy flag (simple/legacy/all) for flexible strategy selection
- Add --simple-config flag for custom simple rotation config path
- Update Dockerfile and docker-compose.yml path references
- Add configurable title to send_report_to_dingtalk()
2026-06-02 01:16:34 +08:00

27 lines
669 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM index-base:latest
# 设置工作目录
WORKDIR /app
# 复制依赖文件
COPY requirements.txt .
RUN uv pip install --system -r requirements.txt
# 仅复制除 data 目录外的应用代码, data 在 dockerignore 中已经被排除
COPY . .
# 创建日志目录
RUN mkdir -p /app/logs
# 设置时区为上海
ENV TZ=Asia/Shanghai
# 暴露端口如需Web服务
EXPOSE 80
# 启动Flask数据API服务默认端口80
CMD ["python", "datasource/flask_server.py", "--host", "0.0.0.0"]
# 运行定时任务调度器如需使用Flask服务取消上面注释并注释掉下面
# CMD ["python", "rotation/daily_scheduler.py", "--time", "09:00"]