Sidekiq integration for Capistrano
Add this line to your application's Gemfile:
gem 'capistrano-sidekiq' , github: 'seuros/capistrano-sidekiq'
or:
gem 'capistrano-sidekiq' , group: :development
And then execute:
$ bundle
# Capfile
require 'capistrano/sidekiq'
require 'capistrano/sidekiq/monit' #to require monit tasks # Only for capistrano3
Configurable options, shown here with defaults:
:sidekiq_default_hooks => true
:sidekiq_pid => File.join(shared_path, 'tmp', 'pids', 'sidekiq.pid')
:sidekiq_env => fetch(:rack_env, fetch(:rails_env, fetch(:stage)))
:sidekiq_log => File.join(shared_path, 'log', 'sidekiq.log')
:sidekiq_options => nil
:sidekiq_require => nil
:sidekiq_tag => nil
:sidekiq_config => nil
:sidekiq_queue => nil
:sidekiq_timeout => 10
:sidekiq_role => :app
:sidekiq_processes => 1
:sidekiq_concurrency => nil
:sidekiq_cmd => "#{fetch(:bundle_cmd, "bundle")} exec sidekiq" # Only for capistrano2.5
:sidekiqctl_cmd => "#{fetch(:bundle_cmd, "bundle")} exec sidekiqctl" # Only for capistrano2.5
There is a know bug that prevent sidekiq from starting when pty is true
set :pty, false
- 0.3.7: * fix capistrano2 task @tribble * Run Sidekiq as daemon from Monit @dpaluy
- 0.3.5: Added :sidekiq_tag for capistrano2 @OscarBarrett
- 0.3.4: fix bug in sidekiq:start for capistrano 2 task
- 0.3.3: sidekiq:restart after deploy:restart added to default hooks
- 0.3.2: :sidekiq_queue accept an array
- 0.3.1: Fix logs @rottman, add concurrency option support @ungsophy
- 0.3.0: Fix monit task @andreygerasimchuk
- 0.2.9: Check if current directory exist @alexdunae
- 0.2.8: Added :sidekiq_queue & :sidekiq_config
- 0.2.7: Signal usage @penso
- 0.2.6: sidekiq:start check if sidekiq is running
- 0.2.5: bug fixes
- 0.2.4: Fast deploy with :sidekiq_run_in_background
- 0.2.3: Added monit tasks (alpha)
- 0.2.0: Added sidekiq:rolling_restart - @jlecour
- [Jérémy Lecour] (https://github.com/jlecour)
- [Fabien Penso] (https://github.com/penso)
- [Alex Dunae] (https://github.com/alexdunae)
- [andreygerasimchuk] (https://github.com/andreygerasimchuk)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request