Reputation: 5163
I recently added the dokku-shoreman
plugin and a Procfile
so that my app runs both a worker and web process when I deploy. It looks like this:
web: bundle exec rails server -p $PORT
worker: bundle exec rake jobs:work
However, now I when I use dokku run <app> <cmd>
such as ...rake db:migrate
a server and worker start running instead.
Currently the only way I know how to run the worker is with the Procfile
. It's not a big issue to start it manually after I deploy - only I don't know how.
Though the ideal would still be to have the both the Procfile
and dokku run
working.
Upvotes: 4
Views: 3366
Reputation: 5163
Update 2 Dokku now supports this http://dokku.viewdocs.io/dokku/deployment/process-management/
Update: checkout dokku-alt (no longer maintained) first - it's what I've switched to instead.
This is a known issue with dokku.
This was a temporary solution detailed in the issue discussion that worked for me:
Procfile
to Procfile.real
create a new Procfile
with the following content:
web: bundle exec foreman start -f Procfile.real
gem 'foreman'
as a dep in Gemfile
bundle install
Procfile*
and Gemfile*
Upvotes: 3