Skip to content

Commit

Permalink
fix redis env in staging (#620)
Browse files Browse the repository at this point in the history
* fix redis env in staging

* verify none on staging
  • Loading branch information
aliciapaz authored Oct 22, 2024
1 parent 0581214 commit a8ef6fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions config/cable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ production:
channel_prefix: giving_connection_production
ssl_params:
verify_mode: <%= OpenSSL::SSL::VERIFY_NONE %>

staging:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
channel_prefix: giving_connection_staging
ssl_params:
verify_mode: <%= OpenSSL::SSL::VERIFY_NONE %>
2 changes: 1 addition & 1 deletion config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
REDIS_URL = if Rails.env.production?
ENV["REDIS_URL"] || Rails.application.credentials.production[:redis_url]
elsif Rails.env.staging?
ENV["REDISCLOUD_URL"] || Rails.application.credentials.staging[:redis_url]
ENV["REDIS_URL"] || Rails.application.credentials.staging[:redis_url]
else
ENV["REDISCLOUD_URL"] || Rails.application.credentials.development[:redis_url]
end
Expand Down

0 comments on commit a8ef6fc

Please sign in to comment.