Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Commit f727971

Browse files
committed
add puma and version bump assets
1 parent 1f88fb1 commit f727971

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ gem 'eco'
3939
# Store ActiveRecord IDs non-obviously in URL using hashids.
4040
gem 'hashids'
4141

42+
gem 'puma'
43+
4244
# rails 4.2 removes support for respond_to/respond_with
4345
gem 'responders', '~> 2.0'
4446

Gemfile.lock

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ GEM
7777
nokogiri (1.6.6.2)
7878
mini_portile (~> 0.6.0)
7979
pg (0.18.3)
80+
puma (2.14.0)
8081
rack (1.6.4)
8182
rack-cors (0.4.0)
8283
rack-test (0.6.3)
@@ -154,6 +155,7 @@ DEPENDENCIES
154155
hashids
155156
jquery-rails
156157
pg
158+
puma
157159
rack-cors
158160
rails (= 4.2.0)
159161
rails_12factor

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bundle exec puma -C config/puma.rb

config/initializers/assets.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Be sure to restart your server when you modify this file.
22

33
# Version of your assets, change this if you want to expire all your assets.
4-
Rails.application.config.assets.version = '1.0'
4+
Rails.application.config.assets.version = '1.1'
55

66
# Add additional assets to the asset load path
77
# Rails.application.config.assets.paths << Emoji.images_path

config/puma.rb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
2+
threads_count = Integer(ENV['MAX_THREADS'] || 5)
3+
threads threads_count, threads_count
4+
5+
preload_app!
6+
7+
rackup DefaultRackup
8+
port ENV['PORT'] || 3000
9+
environment ENV['RACK_ENV'] || 'development'
10+
11+
on_worker_boot do
12+
# Worker specific setup for Rails 4.1+
13+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
14+
ActiveRecord::Base.establish_connection
15+
end

0 commit comments

Comments
 (0)