Created
September 4, 2014 02:21
-
-
Save shurane/82718f08bb9a6b683342 to your computer and use it in GitHub Desktop.
PM2 managing arbitrary binaries. Thanks @ravi and pm2 issue #471!
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
[{ | |
"name" : "redis-server", | |
"script": "/usr/local/bin/redis-server", | |
"instances" : 1, | |
"out_file" : "redis-server.log", | |
"error_file" : "redis-server.error", | |
"exec_interpreter" : "none", | |
"exec_mode" : "fork_mode" | |
}, { | |
"name" : "mongod", | |
"script": "/usr/local/bin/mongod", | |
"args": "['--dbpath=.']", | |
"cwd": ".", | |
"instances" : 1, | |
"out_file" : "mongod.log", | |
"error_file" : "mongod.error", | |
"exec_interpreter" : "none", | |
"exec_mode" : "fork_mode" | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PM2 managing arbitrary binaries. In this case, redis and mongodb on OS X. Feel free to modify this if you like. This has been possible since Ravi's PR issue link at Unitech/pm2#471. "cwd" line is shown for gratuitous effect, but is unnecessary. And of course, there are the rest of the options listed at https://github.com/Unitech/pm2/#json-app-declaration
With this, it acts a lot like supervisord, monit, and so on. Just start it with
pm2 start app.json
. and badda-bing, badda-boom.