Skip to content

Instantly share code, notes, and snippets.

@ravzski
ravzski / deploy.rb
Created August 24, 2018 11:51
puma work around
#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
@ravzski
ravzski / capistrano
Created August 15, 2018 16:42
puma unix
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"
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