mirror of
https://github.com/Unitech/pm2.git
synced 2026-02-01 16:57:09 +00:00
Merge branch 'development' of github.com:Unitech/PM2 into development
This commit is contained in:
commit
bc30bda25a
@ -6,6 +6,7 @@
|
||||
- Disabled auto-gc on interactor
|
||||
- Allow PM2 to execute binaries in $PATH
|
||||
- pm2 link priv pub --recyle for elastic infrastructure
|
||||
- pm2 deploy now check default file ecosystem.js[on|on5], package.json
|
||||
|
||||
# 0.14.6
|
||||
|
||||
|
||||
@ -38,13 +38,13 @@ Your app is now put in background, monitored and kept alive forever.
|
||||
|
||||
## Module system
|
||||
|
||||
PM2 embbed a simple and powerful module system. Installing a module is straightforward:
|
||||
PM2 embeds a simple and powerful module system. Installing a module is straightforward:
|
||||
|
||||
```bash
|
||||
$ pm2 install <module_name>
|
||||
```
|
||||
|
||||
Here are some PM2 compatible modules (this is standalone Node.js softwares that are managed by PM2):
|
||||
Here are some PM2 compatible modules (standalone Node.js applications managed by PM2):
|
||||
|
||||
[**pm2-logrotate**](https://github.com/pm2-hive/pm2-logrotate) auto rotate logs of PM2 and applications managed<br/>
|
||||
[**pm2-webshell**](https://github.com/pm2-hive/pm2-webshell) expose a fully capable terminal in browsers<br/>
|
||||
|
||||
@ -24,6 +24,7 @@ var extItps = require('./interpreter.json');
|
||||
var InteractorDaemonizer = require('./Interactor/InteractorDaemonizer');
|
||||
var json5 = require('./tools/json5.js');
|
||||
var Config = require('./tools/Config');
|
||||
var Utility = require('./Utility.js');
|
||||
|
||||
var Modularizer = require('./Modularizer.js');
|
||||
var Configuration = require('../lib/Configuration.js');
|
||||
@ -430,7 +431,12 @@ CLI.deploy = function(file, commands, cb) {
|
||||
// Find ecosystem file by default
|
||||
if (file.indexOf('.json') == -1) {
|
||||
env = args[0];
|
||||
file = 'ecosystem.json';
|
||||
file = Utility.whichFileExists(['ecosystem.js', 'ecosystem.json', 'ecosystem.json5', 'package.json']);
|
||||
|
||||
if (!file) {
|
||||
printError('Not any default deployment file exists');
|
||||
return cb ? cb('Not any default ecosystem file present') : exitCli(cst.ERROR_EXIT);
|
||||
}
|
||||
}
|
||||
else
|
||||
env = args[1];
|
||||
|
||||
@ -20,6 +20,20 @@ var Utility = module.exports = {
|
||||
|
||||
return obj;
|
||||
},
|
||||
whichFileExists : function(file_arr) {
|
||||
var f = null;
|
||||
|
||||
file_arr.some(function(file) {
|
||||
try {
|
||||
fs.statSync(file);
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
f = file;
|
||||
return true;
|
||||
});
|
||||
return f;
|
||||
},
|
||||
clone : function(obj) {
|
||||
if (obj === null || obj === undefined) return {};
|
||||
return clone(obj);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user