Back to clever-cloud.com

Well, if you need some logos, we provide these:

svg ·  png
Red Clever Cloud logo
svg ·  png
svg ·  png
White Clever Cloud logo
svg · png
White Clever Cloud logo
svg · png
Posted at May 5, 2015 — Engineering

Rails 4 apps backed by Sidekiq + Clever Cloud.

At Clever Cloud, we want developers to be happy. To achieve that we try to adapt as quickly as we can to users needs. The other day, someone asked for Sidekiq support for their Rails applications.

What's Sidekiq

Sidekiq is a solution to run long background tasks in ruby. It works by running a background server and treating jobs stored in a Redis. It's helpful to delay tasks, take a long API call to the background while still be able to answer to a request in a timely manner.

How do I use Sidekiq on Clever Cloud?

First, you need a Redis instance. Start by provisioning a redis addon on Clever Cloud. Remember to link the redis add-on to your application in the Console.

The redis addon provides a REDIS_URL environment variable which will be used by sidekiq to connect to the redis addon.

  • The next and only step is to add/modify the clevercloud/ruby.json file to add the
    "sidekiq" flag:
{
   "deploy": {
      "sidekiq": true
   }
}

Then commit and push your application, and you should be all set!

Tags:

Julien Durillon

Dev & ops @ Clever Cloud since 2010. I'm responsible for the invoices your receive 😬

Check out our Blog

We write about programming, security and Clever Cloud products

Join thousands of developers already using Clever Cloud. And try it for free!

Create your account now to start your apps and collaborate within a few minutes. For free with 20€ offered.

By signing up, your agree to our terms of use
Or
Sign in with Github