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 |
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
set :puma_bind, "unix://#{shared_path}/tmp/sockets/#{fetch(:application)}-puma.sock" | |
set :puma_state, "#{shared_path}/tmp/pids/puma.state" | |
set :puma_pid, "#{shared_path}/tmp/pids/puma.pid" | |
set :puma_access_log, "#{release_path}/log/puma.error.log" | |
set :puma_error_log, "#{release_path}/log/puma.access.log" |
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
Step 1: Precompile Assets | |
RAILS_ENV=production rake assets:precompile | |
commit, then push to the master branch. | |
Note | |
*This is not neccessarily needs to be the master branch. Say there's a separate instance of staging, then it is proper to have a staging branch and use that instead. | |
*Check for conflicts in the manifest file. If there are conflicts, precompile again. If precompile fails. Use rake assets:clean or purge the public assets folder. | |
Step 2: Test Production ENV in local |