README.md in capistrano-sidekiq-1.0.0 vs README.md in capistrano-sidekiq-1.0.1

- old
+ new

@@ -57,15 +57,26 @@ :sidekiq_cmd => "#{fetch(:bundle_cmd, "bundle")} exec sidekiq" # Only for capistrano2.5 :sidekiqctl_cmd => "#{fetch(:bundle_cmd, "bundle")} exec sidekiqctl" # Only for capistrano2.5 :sidekiq_user => nil #user to run sidekiq as ``` +## Known issues with Capistrano 3 + There is a known bug that prevents sidekiq from starting when pty is true on Capistrano 3. ```ruby set :pty, false ``` +## Bundler + +If you'd like to prepend `bundle exec` to your sidekiq and sidekiqctl calls, modify the SSHKit command maps +in your deploy.rb file: +```ruby +SSHKit.config.command_map[:sidekiq] = "bundle exec sidekiq" +SSHKit.config.command_map[:sidekiqctl] = "bundle exec sidekiqctl" +``` + ## Multiple processes You can configure sidekiq to start with multiple processes. Just set the proper amount in `sidekiq_processes`. You can also customize the configuration for every process. If you want to do that, just set @@ -85,9 +96,29 @@ set :sidekiq_roles, [:sidekiq_small, :sidekiq_big] set :sidekiq_small_processes, 1 set :sidekiq_big_processes, 4 server 'example-small.com', roles: [:sidekiq_small] server 'example-big.com', roles: [:sidekiq_big] +``` + +## Integration with systemd + +Set init system to systemd in the cap deploy config: + +```ruby +set :init_system, :systemd +``` + +Install systemd.service template file and enable the service with: + +``` +bundle exec cap sidekiq:install +``` + +Default name for the service file is `sidekiq-stage.service`. This can be changed as needed, for example: + +```ruby +set :service_unit_name, "sidekiq-#{fetch(:application)}-#{fetch(:stage)}.service" ``` ## Customizing the monit sidekiq templates If you need change some config in redactor, you can