forked from jasder/taskover
add puma server
This commit is contained in:
parent
a614af0f86
commit
69d02d439f
|
|
@ -23,6 +23,7 @@ Vagrantfile
|
|||
.vagrant
|
||||
config/database.yml
|
||||
config/unicorn.rb
|
||||
config/puma.rb
|
||||
db/data.yml
|
||||
.idea
|
||||
*.iml
|
||||
|
|
|
|||
1
Gemfile
1
Gemfile
|
|
@ -3,6 +3,7 @@ source 'https://gems.ruby-china.org'
|
|||
|
||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||
gem 'rails', '5.0.0'
|
||||
gem 'puma'
|
||||
# Use mysql2 as the database for Active Record
|
||||
gem 'mysql2'
|
||||
# Use SCSS for stylesheets
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ GEM
|
|||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
puma (3.6.0)
|
||||
rack (2.0.1)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
|
|
@ -273,6 +274,7 @@ DEPENDENCIES
|
|||
jquery-rails
|
||||
letter_opener
|
||||
mysql2
|
||||
puma
|
||||
rails (= 5.0.0)
|
||||
rspec-rails
|
||||
sass-rails
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
app_root = '/Users/zoker/Hobby/Taskile'
|
||||
pidfile "#{app_root}/tmp/pids/puma.pid"
|
||||
state_path "#{app_root}/tmp/pids/puma.state"
|
||||
stdout_redirect "#{app_root}/log/puma.stdout.log", "#{app_root}/log/puma.stderr.log", true
|
||||
bind 'tcp://127.0.0.1:3001'
|
||||
daemonize true
|
||||
workers 2
|
||||
threads 4, 8
|
||||
preload_app!
|
||||
|
||||
on_worker_boot do
|
||||
ActiveSupport.on_load(:active_record) do
|
||||
ActiveRecord::Base.establish_connection
|
||||
end
|
||||
end
|
||||
|
||||
before_fork do
|
||||
ActiveRecord::Base.connection_pool.disconnect!
|
||||
end
|
||||
Loading…
Reference in New Issue