diff --git a/Gemfile b/Gemfile index d10698e..a00b1c1 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,8 @@ gem 'webpacker', '~> 5.0' gem 'turbolinks', '~> 5' # Use Redis adapter to run Action Cable in production gem 'redis', '~> 4.2.5' +# Ruby wrapper for hiredis (protocol serialization/deserialization and blocking I/O) +gem 'hiredis', '~> 0.6.3' # Use Active Model has_secure_password gem 'bcrypt', '~> 3.1.7' # Flexible authentication solution for Rails with Warden diff --git a/Gemfile.lock b/Gemfile.lock index 72c1b13..780e545 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -129,6 +129,7 @@ GEM globalid (0.4.2) activesupport (>= 4.2.0) hashie (4.1.0) + hiredis (0.6.3) i18n (1.8.10) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) @@ -389,6 +390,7 @@ DEPENDENCIES database_cleaner devise (~> 4.7.3) dotenv-rails + hiredis (~> 0.6.3) listen (~> 3.3) lograge (~> 0.11.2) mobility (~> 1.1.1) diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..65fb78a --- /dev/null +++ b/Procfile @@ -0,0 +1,2 @@ +web: bundle exec rails server -p $PORT +worker: bundle exec sidekiq -t 25 diff --git a/config/environments/production.rb b/config/environments/production.rb index 800514f..7c2d352 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -56,7 +56,7 @@ Rails.application.configure do config.log_tags = [ :request_id ] # Use a different cache store in production. - # config.cache_store = :mem_cache_store + config.cache_store = :redis_cache_store, { url: ENV['REDIS_URL'] } # Use a real queuing backend for Active Job (and separate queues per environment). # config.active_job.queue_adapter = :resque