Puma magick

This commit is contained in:
2015-05-26 14:52:38 +02:00
parent df52998abe
commit 2b9edb6bdd
4 changed files with 24 additions and 7 deletions
+1
View File
@@ -20,6 +20,7 @@ require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'
require 'capistrano/puma'
require "airbrussh/capistrano"
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
+2 -1
View File
@@ -109,11 +109,11 @@ group :development do
gem 'capistrano', '~> 3.0', require: false
gem 'capistrano-rvm', '~> 0.1', require: false
gem 'capistrano-rails', '~> 1.1', require: false
gem 'capistrano3-puma', require: false
gem 'spring'
gem 'spring-commands-rspec'
gem 'web-console', '~> 2.0.0'
gem 'foreman'
gem 'thin'
end
group :test do
@@ -132,6 +132,7 @@ end
# Use unicorn as the app server
# gem 'unicorn'
gem 'puma'
# Deploy with Capistrano
# gem 'capistrano'
+10 -6
View File
@@ -90,6 +90,8 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.7)
airbrussh (0.4.1)
sshkit (>= 1.6.1, != 1.7.0)
arel (6.0.0)
barber (0.6.0)
ember-source
@@ -121,6 +123,9 @@ GEM
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capistrano3-puma (1.0.0)
capistrano (~> 3.0)
puma (>= 2.6)
capybara (2.4.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@@ -157,7 +162,6 @@ GEM
rest-client (~> 1.6.1)
crack (0.4.2)
safe_yaml (~> 1.0.0)
daemons (1.1.9)
debug_inspector (0.0.2)
devise (3.4.1)
bcrypt (~> 3.0)
@@ -320,6 +324,8 @@ GEM
slop (~> 3.4)
pry-rails (0.3.3)
pry (>= 0.9.10)
puma (2.11.3)
rack (>= 1.1, < 2.0)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.6.0)
@@ -435,10 +441,6 @@ GEM
temple (0.7.5)
test_squad (0.0.1)
rails
thin (1.6.3)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0)
rack (~> 1.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
@@ -479,12 +481,14 @@ DEPENDENCIES
active_attr
active_decorator
active_model_serializers (= 0.9.0)
airbrussh
bourbon
cancancan
capistrano (~> 3.0)
capistrano-local-precompile
capistrano-rails (~> 1.1)
capistrano-rvm (~> 0.1)
capistrano3-puma
capybara-screenshot
cmtool!
coffee-rails
@@ -518,6 +522,7 @@ DEPENDENCIES
paperclip
poltergeist
pry-rails
puma
quiet_assets
rack-cors
rails (= 4.2.0)
@@ -535,7 +540,6 @@ DEPENDENCIES
spring-commands-rspec
sucker_punch
test_squad
thin
turnip
uglifier (>= 1.0.3)
web-console (~> 2.0.0)
+11
View File
@@ -38,6 +38,17 @@ set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/sys
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
set :default_env, {'DEPLOY' => 'yes'}
set :puma_threads, [4, 16]
set :puma_workers, 2
set :puma_bind, "unix://#{shared_path}/tmp/sockets/app.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"
set :puma_preload_app, true
set :puma_worker_timeout, nil
set :puma_init_active_record, false # Change to true if using ActiveRecord
# Default value for keep_releases is 5
# set :keep_releases, 5