Files
crypto_monitor/manual_trading_hub/ecosystem.config.cjs
T

41 lines
1.0 KiB
JavaScript
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.
/**
* PM2:多账户交易中控 hub.pyUbuntu / Linux
*
* 前置:
* cd manual_trading_hub
* cp .env.example .env # 按需修改 HUB_PORT、HUB_BRIDGE_TOKEN 等
* python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
*
* 启动:
* pm2 start ecosystem.config.cjs
* pm2 save && pm2 startup
*
* 常用:
* pm2 logs manual-trading-hub
* pm2 restart manual-trading-hub
*
* 子代理(agent)见 ecosystem.agents.config.cjs 或 scripts/后台运行-Ubuntu.md
*/
const path = require("path");
const HUB_DIR = __dirname;
const RUN_SH = path.join(HUB_DIR, "scripts", "run_hub.sh");
module.exports = {
apps: [
{
name: "manual-trading-hub",
cwd: HUB_DIR,
script: RUN_SH,
interpreter: "bash",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "512M",
// 环境变量优先写在 manual_trading_hub/.env(由 run_hub.sh 加载)
// 也可在此覆盖,例如:
// env: { HUB_PORT: "5100", HUB_DISABLED_IDS: "1" },
},
],
};