31 lines
702 B
JavaScript
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,
|
|
},
|
|
},
|
|
],
|
|
};
|