diff --git a/config/deploy.rb b/config/deploy.rb index ec19067..1fca39a 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -27,7 +27,7 @@ namespace :deploy do desc 'Start puma server' task :start, :roles => :app, :except => { :no_release => true } do - run "cd #{current_path} && NEWRELIC_DISPATCHER=puma bundle exec puma -C config/puma.rb --control unix:///tmp/pumactl.sock >> #{shared_path}/log/puma-production.log 2>&1 &", :pty => false + run "cd #{current_path} && NEWRELIC_DISPATCHER=puma bundle exec puma -C config/puma.rb --control unix://#{shared_path}/pumactl.sock >> #{shared_path}/log/puma-production.log 2>&1 &", :pty => false end desc 'Stop puma server' diff --git a/config/nginx.conf b/config/nginx.conf index 5e24a13..04cdbd5 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -1,5 +1,5 @@ upstream puma { - server unix:/tmp/puma.sock fail_timeout=0; + server unix:/home/david/apps/goodbre.ws/shared/sockets/puma.sock fail_timeout=0; } server { diff --git a/config/puma.rb b/config/puma.rb index f2d2f14..85fca97 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,12 +1,13 @@ # Define your root directory -root = "/home/david/apps/goodbre.ws" +root = '/home/david/apps/goodbre.ws' +shared = "#{root}/shared" # Bind to a UNIX socket -bind 'unix:///tmp/puma.sock' +bind "unix://#{shared}/sockets/puma.sock" environment 'production' -pidfile "#{root}/shared/pids/puma.pid" -state_path "#{root}/shared/pids/puma.state" +pidfile "#{shared}/pids/puma.pid" +state_path "#{shared}/pids/puma.state" # 0-16 threads for production environment threads 0, 16