Files
setrip/ecosystem.config.js
T
2026-04-21 16:15:01 +07:00

31 lines
702 B
JavaScript

/**
* PM2 ecosystem — WAJIB memakai nama ecosystem.config.js agar PM2
* mem-parse `apps` (bukan menjalankan file ini sebagai skrip Node).
*
* Jalankan dari root proyek setelah `npm run build`:
* pm2 start ecosystem.config.js --env production
*/
module.exports = {
apps: [
{
name: "setrip",
cwd: __dirname,
script: "node_modules/next/dist/bin/next",
args: "start",
instances: 1,
exec_mode: "fork",
autorestart: true,
watch: false,
max_memory_restart: "512M",
env: {
NODE_ENV: "production",
PORT: 3090,
},
env_production: {
NODE_ENV: "production",
PORT: 3090,
},
},
],
};