首次上传
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* PM2 守护 onchain_scout_gate(Gate USDT 永续行情扫描)
|
||||
*
|
||||
* 在项目根目录:
|
||||
* pm2 start deploy/ecosystem.config.cjs
|
||||
* pm2 logs onchain-scout
|
||||
*
|
||||
* 监听地址与端口来自 config.yaml → app.host / app.port(python -m app.main 内 uvicorn)。
|
||||
*/
|
||||
const path = require("path");
|
||||
const ROOT = path.resolve(__dirname, "..");
|
||||
const isWin = process.platform === "win32";
|
||||
const py = path.join(ROOT, isWin ? path.join(".venv", "Scripts", "python.exe") : path.join(".venv", "bin", "python"));
|
||||
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "onchain-scout",
|
||||
cwd: ROOT,
|
||||
script: py,
|
||||
args: ["-m", "app.main"],
|
||||
interpreter: "none",
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_restarts: 15,
|
||||
min_uptime: "10s",
|
||||
exp_backoff_restart_delay: 2000,
|
||||
error_file: path.join(ROOT, "runtime", "pm2-error.log"),
|
||||
out_file: path.join(ROOT, "runtime", "pm2-out.log"),
|
||||
merge_logs: true,
|
||||
time: true,
|
||||
env: {
|
||||
PYTHONUNBUFFERED: "1",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user