Files
gmail-hook/apps/watcher/ecosystem.config.cjs
T
nsrbandCursor 46a2e2a7b0 feat: add gmail-hook monorepo with watcher, api, and web
Ship the receipt pipeline (Livin/Grab/BRI), PocketBase spendings, PM2 ecosystem, and a proper .gitignore that excludes secrets, SQLite data, and media dumps.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 22:58:47 +07:00

29 lines
632 B
JavaScript

/**
* PM2 ecosystem for the Gmail receipt watcher.
*
* Loads secrets from the monorepo root `.env` via dotenv in src/config.js.
* Override port with WATCHER_PORT (default 3001; production on rpi4 uses 8083).
*
* pm2 start ecosystem.config.cjs
* pm2 save
*/
module.exports = {
apps: [
{
name: "gmail-watcher",
cwd: __dirname,
script: "src/index.js",
interpreter: "node",
instances: 1,
exec_mode: "fork",
autorestart: true,
max_restarts: 10,
restart_delay: 2000,
env: {
NODE_ENV: "production",
WATCHER_PORT: "8083",
},
},
],
};