Files
beast-trader/scripts/deploy_strategy.sh

18 lines
625 B
Bash
Executable File
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.

#!/bin/bash
# deploy_strategy.sh
# 策略部署脚本:从 Gitea 部署到 freqtrade Docker
# 用法bash scripts/deploy_strategy.sh [策略版本]
# 示例bash scripts/deploy_strategy.sh strategies/current/structure_flow_strategy_v2_2d.py
STRATEGY_FILE="${1:-strategies/current/structure_flow_strategy_v2_2d.py}"
FREQTRADE_DIR="/home/ubuntu/freqtrade"
echo "部署策略: ${STRATEGY_FILE}"
cp "${STRATEGY_FILE}" "${FREQTRADE_DIR}/user_data/strategies/"
echo "已复制到 freqtrade user_data/strategies/"
echo "重启 Docker..."
cd "${FREQTRADE_DIR}"
docker-compose down && docker-compose up -d
echo "部署完成"