Created
August 24, 2018 11:51
-
-
Save ravzski/d57cc90267e3eed042803f3384e4e1db to your computer and use it in GitHub Desktop.
puma work around
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NOTES: | |
#0:16 = threads | |
#-w 2 = workers | |
#this will also load puma config located in config/puma.rb | |
namespace :deploy do | |
desc 'Restarting application' | |
task :restart do | |
on roles(:app) do | |
within release_path do | |
with rails_env: fetch(:rails_env) do | |
execute "pkill -9 -f 'rb-fsevent|rails|spring|puma'" | |
execute "cd #{current_path} && ~/.rvm/bin/rvm #{rvm_ruby_version} do RAILS_ENV=production bundle exec puma -t 0:16 -w 2 -d" | |
end | |
end | |
end | |
end | |
end | |
after "deploy:publishing", "deploy:restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment