add pm2 script
This commit is contained in:
parent
3109f200e1
commit
565cfa5f01
|
|
@ -4,6 +4,8 @@ node_modules/
|
||||||
# Logs
|
# Logs
|
||||||
logs/
|
logs/
|
||||||
*.log
|
*.log
|
||||||
|
pids/
|
||||||
|
*.pid
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
|
|
||||||
# OS
|
# OS
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
module.exports = {
|
||||||
|
apps: [
|
||||||
|
{
|
||||||
|
name: "prology-product-banner",
|
||||||
|
script: "./server.js",
|
||||||
|
instances: 1,
|
||||||
|
exec_mode: "fork",
|
||||||
|
watch: false,
|
||||||
|
autorestart: true,
|
||||||
|
max_memory_restart: "300M",
|
||||||
|
env: {
|
||||||
|
NODE_ENV: "production",
|
||||||
|
},
|
||||||
|
// Restart định kỳ mỗi đêm lúc 3:00 AM
|
||||||
|
cron_restart: "0 3 * * *",
|
||||||
|
out_file: "./logs/out.log",
|
||||||
|
error_file: "./logs/error.log",
|
||||||
|
log_date_format: "YYYY-MM-DD HH:mm:ss",
|
||||||
|
merge_logs: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue