Capistrano::Crono::Monit
Monit integration with capistrano-crono
Installation
Add this line to your application's Gemfile:
gem 'capistrano-crono-monit', group: :development
And then execute:
$ bundle install
Usage
# Capfile
require 'capistrano/crono/monit'
Monit is stopped and starter before and after each deploy automatically:
before 'deploy:updating', 'crono:monit:unmonitor'
after 'deploy:published', 'crono:monit:monitor'
List of all tasks:
cap crono:monit:config # Config Crono monit-service
cap crono:monit:monitor # Monitor Crono monit-service
cap crono:monit:restart # Restart Crono monit-service
cap crono:monit:start # Start Crono monit-service
cap crono:monit:stop # Stop Crono monit-service
cap crono:monit:unmonitor # Unmonitor Crono monit-service
Defaults
set :crono_monit_conf_dir, -> { "/etc/monit/conf.d/#{crono_monit_service_name}.conf" }
set :crono_monit_use_sudo, true
set :crono_monit_bin, '/usr/bin/monit'
Dependencies
- capistrano-crono 0.1.2
Customizing the monit crono templates
If you need change config for Monit, you can:
bundle exec rails generate capistrano:crono:monit:template
Contributing
Feel free to contribute.