0.0
No commit activity in last 3 years
No release in over 3 years
Capistrano integration for node.js process manager PM2
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.7
~> 10.0
~> 0.52.0

Runtime

>= 3.0.0, ~> 3.0
 Project Readme

Capistrano_pm2

PM2 support for Capistrano 3.x.

Installation

Add this line to your application's Gemfile:

gem 'capistrano_pm2'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano_pm2

Usage

Require in Capfile to use the default task:

require 'capistrano/pm2'

pm2:restart task will run after deploy:published as part of Capistrano's default deploy, or can be run in isolation with bundle exec cap production pm2:restart

Configurable options:

set :pm2_config, 'config/pm2.json' # PM2 config path by default

Tasks list

With config:
cap pm2:stop # Stop server
cap pm2:start # Start server
cap pm2:restart # Restart server
cap pm2:reload # Reload server
cap pm2:reload # Reload server

Without config:
cap pm2:delete[id] # Delete process by id or name
cap pm2:describe[id] # Describe process by id or name
cap pm2:kill # Kill PM2
cap pm2:list # List of processes
cap pm2:save # Save the processes list
cap pm2:startup # Startup script
cap pm2:dump # Dump processes
cap pm2:resurrect # Resurrect processes
cap pm2:flush # Flush logs
cap pm2:reload_logs # Reload logs
cap pm2:ping # Ping PM2

Contributing

  1. Fork it ( https://github.com/ne1ro/capistrano_pm2/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request