Your problem is here:
cd /home/project/current && bundle exec sidekiq -c 10 -e production -L log/sidekiq.log &
When you add &at the end, the command is executed in a separate process, but this process is still a child of the current process and ends when the current process stops. Instead, you need to run sidekiq as deamon.
bundle exec sidekiq -c 10 -e production -L log/sidekiq.log -d
Pay attention to an additional option. -d
source
share