Tasks to deploy Sidekiq with mina.
Latest commit 89024f2 Nov 6, 2017 @Mic92 Mic92 bump v1.0.3



Build Status

mina-sidekiq is a gem that adds tasks to aid in the deployment of Sidekiq using Mina.

Starting with 1.0.0 this gem requires Mina 1.0! (thanks @devvmh)

Getting Start


gem install mina-sidekiq


require 'mina_sidekiq/tasks'

task :setup do
  # sidekiq needs a place to store its pid file and log file
  command %(mkdir -p "#{fetch(:deploy_to)}/shared/pids/")
  command %(mkdir -p "#{fetch(:deploy_to)}/shared/log/")

task :deploy do
  deploy do
    # stop accepting new workers
    invoke :'git:clone'
    invoke :'sidekiq:quiet'
    invoke :'deploy:link_shared_paths'

    on :launch do
      invoke :'sidekiq:restart'

Available Tasks

  • sidekiq:stop
  • sidekiq:start
  • sidekiq:restart
  • sidekiq:quiet
  • sidekiq:log

Available Options

Option Description
sidekiq Sets the path to sidekiq.
sidekiqctl Sets the path to sidekiqctl.
sidekiq_timeout Sets a upper limit of time a worker is allowed to finish, before it is killed.
sidekiq_log Sets the path to the log file of sidekiq.
sidekiq_pid Sets the path to the pid file of a sidekiq worker.
sidekiq_processes Sets the number of sidekiq processes launched.


The test requires a local running ssh server with the ssh keys of the current user added to its ~/.ssh/authorized_keys. In OS X, this is "Remote Login" under the Sharing pref pane. You will also need a working rvm installation.

To run the full blown test suite use:

bundle exec rake test

For faster release cycle use

cd test_env
bundle exec mina deploy --verbose


Copyright (c) 2016 Jörg Thalheim joerg@higgsboson.tk

See LICENSE for further details.