Sidekiq integration for Capistrano
gem 'capistrano-sidekiq', group: :development
And then execute:
$ bundle
# Capfile
require 'capistrano/sidekiq'
install_plugin Capistrano::Sidekiq # Default sidekiq tasks
# Then select your service manager
install_plugin Capistrano::Sidekiq::Systemd
Configurable options - Please ensure you check your version's branch for the available settings - shown here with defaults:
:sidekiq_roles => :worker
:sidekiq_default_hooks => true
:sidekiq_env => fetch(:rack_env, fetch(:rails_env, fetch(:stage)))
# single config
:sidekiq_config_files, ['sidekiq.yml']
# multiple configs
:sidekiq_config_files, ['sidekiq.yml', 'sidekiq-2.yml'] # you can also set it per server
A sample application is provided to show how to use this gem at https://github.com/seuros/capistrano-example-app
The template used by this project assumes a recent version of Systemd (v240+, e.g. Ubuntu 20.04).
On systems with a less recent version, the append:
functionality is not supported, and the Sidekiq log messages are sent to the syslog.
It's possible to workaround this limitation by configuring the system logger to filter the Sidekiq messages; see wiki.
- 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