- 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()
27 lines
936 B
YAML
27 lines
936 B
YAML
version: '3.8'
|
||
|
||
services:
|
||
etf-scheduler:
|
||
image: 192.168.0.115:5000/etf-scheduler:latest
|
||
container_name: etf-scheduler
|
||
restart: unless-stopped
|
||
environment:
|
||
- TZ=Asia/Shanghai
|
||
volumes:
|
||
# 挂载环境变量文件(必需)
|
||
- ./.env:/app/.env:ro
|
||
# 挂载 SSH 私钥(必需,用于 yfinance 数据下载)
|
||
- ./hk_ecs.pem:/app/hk_ecs.pem:ro
|
||
# 挂载数据目录(持久化)
|
||
- ./data:/app/data
|
||
# 挂载日志目录
|
||
- ./logs:/app/logs
|
||
# 挂载 results 目录(保存报告)
|
||
- ./results:/app/results
|
||
# 默认daemon模式运行,只需简单命令即可
|
||
# command: ["python", "rotation/daily_scheduler.py"]
|
||
# 如需立即执行一次并退出:
|
||
# command: ["python", "rotation/daily_scheduler.py", "--now"]
|
||
# 如需执行一次后进入定时循环:
|
||
# command: ["python", "rotation/daily_scheduler.py", "--no-daemon"]
|