-
Notifications
You must be signed in to change notification settings - Fork 74
Running via PM2
PM2 is a production process manager for Node.js applications. Cloud9 repo includes a configuration file ecosystem.json
that makes it more easier to launch Cloud9 via pm2, monitor resource usage and even enables you to call a restart via terminal on the very same instance you are using it without having to log in via separate ssh terminal.
PM2 itself is not included with Cloud9. Install it globally by:
sudo npm install pm2 -g
Define the following variables:
-
PLN_USERNAME
- Username to authenticate as -
PLN_PASSWORD
- Password for authenticating the user -
PLN_WORKSPACE
- Path to mount as the workspace
You can add environment variables for example in your ~/.profile
file as: export PLN_USERNAME="test"
While in the Pylon directory, start the app process by:
pm2 pylon start
Stop the instance by:
pm2 pylon stop
Restart the instance by:
pm2 pylon restart
List resource usage:
pm2 list
Check the logs:
pm2 log