Capistrano::pumactl
Puma server control tasks for Capistrano 3
Installation
gem 'capistrano', '~> 3.1'
gem 'capistrano-pumactl'And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-pumactl
Usage
Require in Capfile:
require 'capistrano/pumactl'Configurable options, shown here with defaults:
set :pumactl_roles, :app
set :pumactl_config_file, -> { current_path.join('config/puma.rb') }Tasks
This gem provides the following Capistrano tasks:
pumactl:haltpumactl:restartpumactl:phased-restartpumactl:startpumactl:statspumactl:reload-worker-directorypumactl:statuspumactl:stop
Example
Instruct Capistrano to run a phased restart after deploy:
# Hook phased-restart after publishing
after :'deploy:publishing', :'pumactl:phased-restart'Notes
When using rbenv, rvm, chruby and/or bundler don't forget to add pumactl to the bins list:
fetch(:rbenv_map_bins, []).push 'pumactl'
fetch(:rvm_map_bins, []).push 'pumactl'
fetch(:chruby_map_bins, []).push 'pumactl'
fetch(:bundle_bins, []).push 'pumactl'Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request