Skip to content

Commit

Permalink
Fix/ssl cert on prod (#617)
Browse files Browse the repository at this point in the history
* Update SSL settings for heroku

* Fix redis url

* Delete scout

* Add verify mode in cable

* verify none on redis cache store

---------

Co-authored-by: Sergio-e <[email protected]>
  • Loading branch information
aliciapaz and Sergio-e authored Oct 21, 2024
1 parent 9262923 commit e54fb6a
Show file tree
Hide file tree
Showing 5 changed files with 743 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
scout_apm (5.3.8)
scout_apm (5.4.0)
parser
selectize-rails (0.12.6)
selenium-webdriver (4.10.0)
Expand Down Expand Up @@ -593,6 +593,7 @@ PLATFORMS
arm64-darwin-23
x86_64-darwin-19
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
Expand Down
2 changes: 2 additions & 0 deletions config/cable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ production:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
channel_prefix: giving_connection_production
ssl_params:
verify_mode: <%= OpenSSL::SSL::VERIFY_NONE %>
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
config.log_tags = [:request_id]

# Use a different cache store in production.
config.cache_store = :redis_cache_store, {url: ENV["REDIS_URL"]}
config.cache_store = :redis_cache_store, {url: ENV["REDIS_URL"], ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE}}

config.action_mailer.perform_caching = false

Expand Down
12 changes: 9 additions & 3 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
REDIS_URL = if Rails.env.production?
ENV["REDISCLOUD_URL"] || Rails.application.credentials.production[:redis_url]
ENV["REDIS_URL"] || Rails.application.credentials.production[:redis_url]
elsif Rails.env.staging?
ENV["REDISCLOUD_URL"] || Rails.application.credentials.staging[:redis_url]
else
ENV["REDISCLOUD_URL"] || Rails.application.credentials.development[:redis_url]
end

Sidekiq.configure_server do |config|
config.redis = {url: REDIS_URL}
config.redis = {
url: REDIS_URL,
ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE}
}
end

Sidekiq.configure_client do |config|
config.redis = {url: REDIS_URL}
config.redis = {
url: REDIS_URL,
ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE}
}
end
Loading

0 comments on commit e54fb6a

Please sign in to comment.