中控增加下单,关键位,系统设置

This commit is contained in:
dekun
2026-05-22 10:23:48 +08:00
parent 46f73fce43
commit 2d4926cee3
8 changed files with 433 additions and 154 deletions
+40
View File
@@ -0,0 +1,40 @@
/**
* 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" },
},
],
};