Last active
December 11, 2023 20:24
-
Star
(131)
You must be signed in to star a gist -
Fork
(28)
You must be signed in to fork a gist
Revisions
-
pcreux revised this gist
Jul 28, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,6 @@ Free addons! heroku addons:add memcachier heroku addons:add mandrill:starter heroku addons:add newrelic heroku addons:add pgbackups:auto-month heroku addons:add papertrail ``` -
pcreux revised this gist
Jul 21, 2014 . 3 changed files with 37 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ group :production do gem 'unicorn' # Enable gzip compression on heroku, but don't compress images. gem 'heroku-deflater' This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ # config/unicorn.rb worker_processes 3 timeout 30 preload_app true before_fork do |server, worker| # Replace with MongoDB or whatever if defined?(ActiveRecord::Base) ActiveRecord::Base.connection.disconnect! Rails.logger.info('Disconnected from ActiveRecord') end # If you are using Redis but not Resque, change this if defined?(Resque) Resque.redis.quit Rails.logger.info('Disconnected from Redis') end sleep 1 end after_fork do |server, worker| # Replace with MongoDB or whatever if defined?(ActiveRecord::Base) ActiveRecord::Base.establish_connection Rails.logger.info('Connected to ActiveRecord') end # If you are using Redis but not Resque, change this if defined?(Resque) Resque.redis = ENV['REDIS_URI'] Rails.logger.info('Connected to Redis') end end -
pcreux revised this gist
May 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ :entitystore => client } # Send emails via mandrill ActionMailer::Base.delivery_method = :smtp config.action_mailer.smtp_settings = { -
pcreux revised this gist
Feb 22, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ client = Dalli::Client.new(ENV["MEMCACHIER_SERVERS"], :value_max_bytes => 10485760, :expires_in => 86400) # 1 day # Configure rack-cache for using memcachier config.action_dispatch.rack_cache = { -
pcreux revised this gist
Feb 22, 2014 . 2 changed files with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ Free addons! ``` heroku addons:add memcachier heroku addons:add mandrill:starter heroku addons:add newrelic heroku addons:add pgbackups heroku addons:add papertrail This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,14 +21,15 @@ } # Send emails via sendgrid ActionMailer::Base.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => 'smtp.mandrillapp.com', :port => '587', :authentication => :plain, :user_name => ENV['MANDRILL_USERNAME'], :password => ENV['MANDRILL_APIKEY'], :domain => 'heroku.com', } # ... -
pcreux revised this gist
Feb 22, 2014 . 3 changed files with 2 additions and 37 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ group :production do gem 'passenger' # Enable gzip compression on heroku, but don't compress images. gem 'heroku-deflater' This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ web: bundle exec passenger start -p $PORT --max-pool-size 3 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,35 +0,0 @@ -
pcreux revised this gist
Nov 27, 2013 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ Free addons! ``` heroku addons:add memcachier heroku addons:add sendgrid heroku addons:add newrelic heroku addons:add pgbackups heroku addons:add papertrail ``` -
pcreux revised this gist
Nov 27, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,7 @@ end gem 'memcachier' gem 'dalli' # Fast IO for memcache gem 'kgio' # Serve static assets through Rack + Memcache -
pcreux revised this gist
Nov 27, 2013 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,8 @@ # Enable Rails's static asset server for Heroku config.serve_static_assets = true # Set static assets cache header. rack-cache will cache those. config.static_cache_control = "public, max-age=31536000" config.cache_store = :dalli_store @@ -12,11 +14,13 @@ :value_max_bytes => 10485760, :expires_in => 1.day) # Configure rack-cache for using memcachier config.action_dispatch.rack_cache = { :metastore => client, :entitystore => client } # Send emails via sendgrid config.action_mailer.smtp_settings = { :address => 'smtp.sendgrid.net', :port => '587', -
pcreux revised this gist
Nov 27, 2013 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,17 @@ group :production do gem 'unicorn' # Enable gzip compression on heroku, but don't compress images. gem 'heroku-deflater' # Heroku injects it if it's not in there already gem 'rails_12factor' end gem 'memcachier' gem 'dalli' gem 'kgio' # Serve static assets through Rack + Memcache # https://devcenter.heroku.com/articles/rack-cache-memcached-rails31 gem 'rack-cache' -
pcreux renamed this gist
Nov 27, 2013 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ # config/environments/production.rb # ... # Enable Rails's static asset server for Heroku config.serve_static_assets = true config.static_cache_control = "public, max-age=31536000" @@ -23,4 +26,6 @@ :domain => 'heroku.com', :enable_starttls_auto => true } # ... -
pcreux renamed this gist
Nov 27, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # config/unicorn.rb worker_processes 3 timeout 30 preload_app true -
pcreux revised this gist
Nov 27, 2013 . 2 changed files with 34 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ worker_processes 3 timeout 30 preload_app true before_fork do |server, worker| # Replace with MongoDB or whatever if defined?(ActiveRecord::Base) ActiveRecord::Base.connection.disconnect! Rails.logger.info('Disconnected from ActiveRecord') end # If you are using Redis but not Resque, change this if defined?(Resque) Resque.redis.quit Rails.logger.info('Disconnected from Redis') end sleep 1 end after_fork do |server, worker| # Replace with MongoDB or whatever if defined?(ActiveRecord::Base) ActiveRecord::Base.establish_connection Rails.logger.info('Connected to ActiveRecord') end # If you are using Redis but not Resque, change this if defined?(Resque) Resque.redis = ENV['REDIS_URI'] Rails.logger.info('Connected to Redis') end end -
pcreux revised this gist
Nov 27, 2013 . 1 changed file with 26 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ Refuge::Application.configure do # Enable Rails's static asset server for Heroku config.serve_static_assets = true config.static_cache_control = "public, max-age=31536000" config.cache_store = :dalli_store client = Dalli::Client.new(ENV["MEMCACHIER_SERVERS"], :value_max_bytes => 10485760, :expires_in => 1.day) config.action_dispatch.rack_cache = { :metastore => client, :entitystore => client } config.action_mailer.smtp_settings = { :address => 'smtp.sendgrid.net', :port => '587', :authentication => :plain, :user_name => ENV['SENDGRID_USERNAME'], :password => ENV['SENDGRID_PASSWORD'], :domain => 'heroku.com', :enable_starttls_auto => true } end -
pcreux created this gist
Nov 27, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ group :production do gem 'unicorn' gem 'heroku-deflater' gem 'rails_12factor' end gem 'memcachier' gem 'dalli' gem 'kgio' gem 'rack-cache'