add deployment and ecosystem pm2
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* PM2 ecosystem — jalankan dari root proyek setelah `npm run build`.
|
||||
* Contoh: pm2 start ecosystem.js
|
||||
*/
|
||||
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,
|
||||
},
|
||||
// Override di server produksi, contoh:
|
||||
// pm2 start ecosystem.js --env production
|
||||
env_production: {
|
||||
NODE_ENV: "production",
|
||||
PORT: 3090,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user