Files
crypto_okx_hub/ecosystem.config.cjs
dekun d726810320 支持 Ubuntu 一键部署与 PM2,并增加系统设置改密。
默认账号改为 admin/admin123,去掉 Windows 部署说明,与客户端同套部署流程。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 11:03:29 +08:00

29 lines
595 B
JavaScript

/**
* PM2 进程定义(Ubuntu / Linux).
*
* 使用前:项目根存在 `.venv`,且已 pip install -r requirements.txt
*
* pm2 start ecosystem.config.cjs
* pm2 save && pm2 startup
*/
const path = require("path");
const ROOT = __dirname;
const PY = path.join(ROOT, ".venv", "bin", "python");
module.exports = {
apps: [
{
name: "crypto_okx_hub",
cwd: ROOT,
script: path.join(ROOT, "app.py"),
interpreter: PY,
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "400M",
env: { PYTHONPATH: ROOT },
},
],
};