// author: simon-pierre boucher // PM2 process definitions for Tendril on the production node (§16.3). // The API binds to loopback only; ngrok is the sole ingress (§16.5). const PORT = process.env.TENDRIL_PORT || "8092"; module.exports = { apps: [ { name: "tendril-api", script: "apps/api/dist/main.js", interpreter: "node", cwd: process.env.TENDRIL_DIR || `${process.env.HOME}/apps/tendril`, env: { NODE_ENV: "production", HOST: "127.0.0.1", PORT, LOG_LEVEL: "info", }, max_restarts: 20, restart_delay: 2000, kill_timeout: 65000, }, { name: "tendril-ngrok", script: "/opt/homebrew/bin/ngrok", interpreter: "none", args: `http --url=www.ten-dril.com ${PORT}`, max_restarts: 50, restart_delay: 5000, }, ], };