When I do a mina deploy no errors will happen and it shows starting/stopping of sidekiq etc.. but sometimes the latest code doesn't actually deploy to the production server or our staging server. If I had to guess, I would say ~90% of the time it works and ~10% it doesn't. To fix the issue, I have to manually kill the unicorn pid and then do a re-deploy and this works every time.
I don't see anything in the code that could be causing issues, should I be stopping unicorn and then starting it back up instead of just restarting it? My thought there is that I might miss requests.
deploy.rb
desc "Deploys the current version to the server."
task :deploy => :environment do
deploy do
# stop accepting new workers
invoke :'sidekiq:quiet'
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
invoke :'deploy:cleanup'
to :launch do
invoke :'sidekiq:restart'
invoke :'unicorn:restart'
end
end
When I do a mina deploy no errors will happen and it shows starting/stopping of sidekiq etc.. but sometimes the latest code doesn't actually deploy to the production server or our staging server. If I had to guess, I would say ~90% of the time it works and ~10% it doesn't. To fix the issue, I have to manually kill the unicorn pid and then do a re-deploy and this works every time.
I don't see anything in the code that could be causing issues, should I be stopping unicorn and then starting it back up instead of just restarting it? My thought there is that I might miss requests.
deploy.rb