Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dockerizing Delayed Job

We are currently working on Dockerizing our Ruby on Rails application, which also includes Delayed Job. A question buzzing within our development team is whether and/or how to Dockerize the Delayed Job component separately from the application.

This would allow Delayed Job to start up new containers when necessary for high traffic within the jobs queue. In addition, since Delayed Job actually starts up the Rails application each time when first booting up, we thought the following benefits would follow:

  1. The Delayed Job container might start up quicker
  2. Application code would start up regardless of the Delayed Job container startup time
like image 781
user2990654 Avatar asked Jul 14 '15 02:07

user2990654


1 Answers

So I know a guy responsible for a rails app that uses delayed jobs. When it came time to dockerize said app, it got a container for each. Both containers are using the same codebase but one runs the frontend and one the jobs. It's not devops microservice-eriffic but it works.

Outside of the logical separation between the two, docker containers are supposed to only have a single process running inside. Could've hacked it together but it seemed wrong to break a docker fundamental out of the gate.

like image 113
Creek Avatar answered Sep 18 '22 23:09

Creek