Files
etf/docker-compose.yml
aszerW 70515ab169 fix: SSH密钥路径从根目录迁移到config目录
修改内容:
1. datasource/flask_server.py
   - 默认路径从 'hk_ecs.pem' 改为 'config/hk_ecs.pem'

2. docker-compose.yml
   - 挂载路径从 './hk_ecs.pem:/app/hk_ecs.pem'
   - 改为 './config/hk_ecs.pem:/app/config/hk_ecs.pem'

3. build-and-push.sh
   - 示例命令中的路径同步更新

4. README.md
   - 项目结构说明中更新密钥位置

验证:
- rotation.yaml 已使用 config/hk_ecs.pem(无需修改)
- flask_server 默认路径正确指向 config/hk_ecs.pem
- 密钥文件存在于 config/hk_ecs.pem
2026-05-12 22:02:35 +08:00

27 lines
951 B
YAML
Raw 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.

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 数据下载)
- ./config/hk_ecs.pem:/app/config/hk_ecs.pem:ro
# 挂载数据目录(持久化)
- ./data:/app/data
# 挂载日志目录
- ./logs:/app/logs
# 挂载 results 目录(保存报告)
- ./results:/app/results
# 默认daemon模式运行只需简单命令即可
# command: ["python", "scripts/daily_scheduler.py"]
# 如需立即执行一次并退出:
# command: ["python", "scripts/daily_scheduler.py", "--run-now"]
# 如需执行一次后进入定时循环:
# command: ["python", "scripts/daily_scheduler.py", "--no-daemon"]