Files
2026-05-21 16:44:31 +08:00

34 lines
914 B
JavaScript
Raw Permalink 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 进程定义(Ubuntu / Linux)。
*
* 仅托管 Flask 应用。**SSH SOCKS 隧道请在本机用 screen/tmux/systemd 等方式单独常驻**
* 与 `.env` 里 `GATE_SOCKS_PROXY` 端口一致即可;不必交给 PM2。
*
* 使用前:项目根目录存在 `.venv`,且已安装依赖(走 SOCKS 时需 PySocks)。
*
* 启动:
* 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_gate",
cwd: ROOT,
script: path.join(ROOT, "app.py"),
interpreter: PY,
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "800M",
// app.py 从项目根目录 .env 加载(由 .env.example 复制而来,勿提交 Git
},
],
};