Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/arkency/sidekiq-rails-cookbook

sidekiq-rails-cookbook
https://github.com/arkency/sidekiq-rails-cookbook

Last synced: 5 days ago
JSON representation

sidekiq-rails-cookbook

Awesome Lists containing this project

README

        

# sidekiq-rails cookbook

Configures sidekiq worker for your app managed by runit.

# Requirements

* App user configured to use proper ruby version when using bash.
For example by using [`ruby-build` cookbook](https://github.com/arkency/ruby-build-cookbook).
More on our prefered setup can be found in [One app, one user, one ruby](http://blog.arkency.com/2012/11/one-app-one-user-one-ruby/)
blogpost.
* Runit
* Sidekiq gem in your rails app

# Usage

Call it from your recipe or provider that setups your rails app

```ruby
sidekiq_rails do
service_name "sidekiq-rails-depot"
user_name "depot"
app_dir "/var/lib/depot/current"
rails_env "production"
end
```

# Warning

* This cookbook is starting the sidekiq process using `su`, not `chpst`
* You should stop and start the worker process as part of your deploy procedure.
For example by using `sv stop /etc/sv/sidekiq-rails-depot/` &
`sv start /etc/sv/sidekiq-rails-depot/`. The permission allow app user to stop
and start this service. No need to use `root` user or `sudo` for that.

# Author

Arkency ()

# License

Apache 2.0