/** * 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 }, }, ], };