chore(bundle): +kredis
This commit is contained in:
parent
15e0ed8480
commit
4d1988fd66
3 changed files with 13 additions and 0 deletions
1
Gemfile
1
Gemfile
|
@ -54,6 +54,7 @@ gem 'invisible_captcha'
|
|||
gem 'json_schemer'
|
||||
gem 'jwt'
|
||||
gem 'kaminari'
|
||||
gem 'kredis'
|
||||
gem 'listen' # Required by ActiveSupport::EventedFileUpdateChecker
|
||||
gem 'lograge'
|
||||
gem 'logstash-event'
|
||||
|
|
|
@ -379,6 +379,10 @@ GEM
|
|||
activerecord
|
||||
kaminari-core (= 1.2.2)
|
||||
kaminari-core (1.2.2)
|
||||
kredis (1.7.0)
|
||||
activemodel (>= 6.0.0)
|
||||
activesupport (>= 6.0.0)
|
||||
redis (>= 4.2, < 6)
|
||||
launchy (2.5.0)
|
||||
addressable (~> 2.7)
|
||||
letter_opener (1.7.0)
|
||||
|
@ -876,6 +880,7 @@ DEPENDENCIES
|
|||
json_schemer
|
||||
jwt
|
||||
kaminari
|
||||
kredis
|
||||
launchy
|
||||
letter_opener_web
|
||||
listen
|
||||
|
|
7
config/initializers/kredis.rb
Normal file
7
config/initializers/kredis.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
redis_volatile_options = {
|
||||
url: ENV['REDIS_CACHE_URL'], # will fallback to default redis url if empty, and won't fail if there is no redis server
|
||||
ssl: ENV['REDIS_CACHE_SSL'] == 'enabled'
|
||||
}
|
||||
redis_volatile_options[:ssl_params] = { verify_mode: OpenSSL::SSL::VERIFY_NONE } if ENV['REDIS_CACHE_SSL_VERIFY_NONE'] == 'enabled'
|
||||
|
||||
Kredis::Connections.connections[:volatile] = Redis.new(redis_volatile_options)
|
Loading…
Reference in a new issue