Was wondering if there is a tutorial on how to setup background job server in Ubuntu with Rails
For background jobs on Ubuntu, you would normally use SystemD.
With sidekiq, you would:
- Add the Sidekiq systemd script to
/etc/systemd/system/sidekiq.service sudo systemctl daemon-reloadsudo systemctl enable sidekiqsudo systemctl start sidekiq
daemon-reload refreshes systemd so it sees the new service.
enable allows it to start when the server boots.
start starts sidekiq
You then want to run sudo systemctl restart sidekiq on deploy so it can pickup the latest Rails code for the jobs.