-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pm2 ecosystem.json for use with pm2
- Loading branch information
1 parent
03161ac
commit 626dff9
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: ./node_modules/.bin/forever -m 5 app.js | ||
web: node app.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"apps" : [{ | ||
// mean-stack-relational app | ||
"name" : "msr", | ||
"script" : "app.js", | ||
// by default, the app runs in fork mode, uncomment below to run in cluster mode | ||
//"instances" : 4, | ||
//"exec_mode" : "cluster_mode", // defaults to fork | ||
"args" : ["--color"], | ||
"watch" : true, | ||
"ignore_watch" : ["pids", "logs", "node_modules", "bower_components"], | ||
"merge_logs" : true, // merge logs from all instances in cluster mode | ||
"cwd" : ".", | ||
"error_file" : "./logs/msr.log", | ||
"out_file" : "./logs/msr.log", | ||
"pid_file" : "./pids/msr.pid", | ||
"min_uptime" : "30s", // defaults to 1000s | ||
"max_restarts" : 30, // defaults to 15 | ||
"restart_delay" : 1000, | ||
"max_memory_restart" : "8G", // restart app if it reaches an 8GB memory footprint | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"env_production" : { | ||
"NODE_ENV": "production" | ||
} | ||
}] | ||
} |