Question

I'm using Dokku and the delayed_job gem, and I'm trying to start the process like this:

dokku run APP_NAME bin/delayed_job start RAILS_ENV=production

But no jobs are registered, and when I do this:

dokku run APP_NAME bin/delayed_job restart RAILS_ENV=production

I get Warning: no instances running. Starting...

However, if I start the the proccess with:

dokku run APP_NAME rake jobs:work

It works... But only as long as I'm logged in to the server.

Any ideas?

Was it helpful?

Solution

So this is how I got it to work:

I installed the Dokku Shoreman plugin and then created a Procfile in the apps root folder like this:

web: bundle exec rails server -p $PORT
worker: bundle exec rake jobs:work

Now everything works like it should.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top