mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
commit
f10f9d7547
3
Gemfile
3
Gemfile
@ -1,6 +1,9 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rails', '4.2.5'
|
||||
gem 'puma', '~> 3.6.0'
|
||||
gem 'puma-heroku'
|
||||
gem 'rack-timeout'
|
||||
|
||||
# Storage
|
||||
gem 'aws-sdk', '~> 1.50'
|
||||
|
||||
@ -201,9 +201,13 @@ GEM
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
puma (3.6.0)
|
||||
puma-heroku (1.0.0)
|
||||
puma (~> 3.0)
|
||||
rack (1.6.4)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rack-timeout (0.4.2)
|
||||
rails (4.2.5)
|
||||
actionmailer (= 4.2.5)
|
||||
actionpack (= 4.2.5)
|
||||
@ -361,6 +365,9 @@ DEPENDENCIES
|
||||
paperclip (~> 4.2.0)
|
||||
pg
|
||||
pry
|
||||
puma (~> 3.6.0)
|
||||
puma-heroku
|
||||
rack-timeout
|
||||
rails (= 4.2.5)
|
||||
rails-jquery-autocomplete
|
||||
rails-perftest
|
||||
|
||||
@ -22,6 +22,7 @@ test: &test
|
||||
|
||||
cucumber:
|
||||
<<: *test
|
||||
|
||||
|
||||
production:
|
||||
url: <%= ENV['DATABASE_URL'] %>
|
||||
pool: <%= ENV['RAILS_MAX_THREADS'] || 5 %>
|
||||
|
||||
1
config/initializers/rack_timeout.rb
Normal file
1
config/initializers/rack_timeout.rb
Normal file
@ -0,0 +1 @@
|
||||
Rack::Timeout.timeout = 20 # seconds
|
||||
17
config/puma.rb
Normal file
17
config/puma.rb
Normal file
@ -0,0 +1,17 @@
|
||||
require 'puma/plugin/heroku'
|
||||
|
||||
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
|
||||
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
|
||||
threads threads_count, threads_count
|
||||
|
||||
preload_app!
|
||||
|
||||
rackup DefaultRackup
|
||||
port ENV['PORT'] || 3000
|
||||
environment ENV['RACK_ENV'] || 'development'
|
||||
|
||||
on_worker_boot do
|
||||
# Worker specific setup for Rails 4.1+
|
||||
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
|
||||
ActiveRecord::Base.establish_connection
|
||||
end
|
||||
Loading…
Reference in New Issue
Block a user