README.md in capistrano-base_helper-0.0.6 vs README.md in capistrano-base_helper-0.0.7
- old
+ new
@@ -21,11 +21,11 @@
### Monit
All these tasks do monit tasks for all services setup with monit.
-```ruby
+```
cap monit:disable # Disable monit services for application
cap monit:enable # Enable monit services for application
cap monit:main_config # Setup main monit config file (/etc/monit/monitrc)
cap monit:monitor # Monitor the application
cap monit:purge # Purge/remove all monit configurations for the application
@@ -35,22 +35,53 @@
cap monit:start # Start monitoring the application permanent (Monit saves state)
cap monit:status # Status monit (global)
cap monit:stop # Stop monitoring the application permanent (Monit saves state)
```
+#### Setup in your deploy file
+
+You can add this to deploy.rb or env.rb in order to automatically monitor/unmonitor tasks
+
+It is important to unmonitor tasks while deploying as they can trigger stops/restarts to the app that monit thinks are "crashes"
+
+_Note: This is already done in monit\_base.rb, so no additional setup in deploy.rb or env.rb required_
+
+```ruby
+before "deploy", "monit:unmonitor"
+after "deploy", "monit:monitor"
+```
+
+If you want monit to automatically start/stop runit instead of triggering seperately
+
+```ruby
+before "monit:unmonitor", "monit:stop"
+after "monit:monitor", "monit:start"
+```
+
### Runit
All these tasks do runit tasks for all services setup with runit.
-```ruby
+```
cap runit:disable # Disable runit services for application
cap runit:enable # Enable runit services for application
cap runit:once # Only start services once.
cap runit:purge # Purge/remove all runit configurations for the application
cap runit:setup # Setup runit for the application
cap runit:start # Start all runit services for current application
cap runit:stop # Stop all runit services for current application
```
+
+#### Setup in your deploy file
+
+You can add this to deploy.rb or env.rb in order to automatically start/stop tasks
+
+```ruby
+before "deploy", "runit:stop"
+after "deploy", "runit:start"
+```
+
+See each gem if you want to start/stop each service separate instead of together.
## Assumptions
There are some assumptions when using this with capistrano.
The following variables must be set