pm2 module offline installation

Created on 28 Jul 2015  路  6Comments  路  Source: Unitech/pm2

Hi, I'd like to install a pm2 module (in this case pm2-logrotate) without a network connection. Is this possible? I can probably install the pm2 module to .pm2/node_modules using npmbox, but how can I get pm2 to active the module?

Feature Question

All 6 comments

Hello,
Good question, this needs to be documented in the future,

PM2 auto start all modules present in .pm2/node_modules, a good practice would be to directly tar the .pm2 folder and untar it in your offline server.

_Note: pm2 export = generate .tar.gz with modules, configuration, dump file etc_

Possible starting PM2 2.X

$ pm2 install my-packed-module.tgz

I tried that with no luck. How exactly the packed module should be packed? Still no mention in documentation.

You can use something like npm-bundle pm2-logrotate

Even with this offline installation it still requires git.
Any idea?

You have to use the absolute path to the module like this:

pm2 install /home/user/pm2-logrotate-2.7.0.tgz

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chaos-git picture chaos-git  路  3Comments

shaunwarman picture shaunwarman  路  3Comments

waygee picture waygee  路  4Comments

lefam picture lefam  路  3Comments

ldarren picture ldarren  路  3Comments