Skip to content

Commit

Permalink
Merge pull request #3166 from bitzesty/pb/configure-redis-action-cabl…
Browse files Browse the repository at this point in the history
…e-production

Configure Redis && ActionCable for Production
  • Loading branch information
phil-l-brockwell authored Dec 18, 2024
2 parents aebd96f + eda7471 commit 131fb03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def set_session_identifier
end

def session_cookie
cookies["_qae_session#{"_development" if Rails.env.development?}"]
cookies["_qae_session_#{Rails.env}"]
end

protected
Expand Down
2 changes: 1 addition & 1 deletion config/cable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ test:

production:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
url: <%= CredentialsResolver.redis_uri %>
channel_prefix: qae_production
4 changes: 2 additions & 2 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require Rails.root.join("lib/formatters/asim_formatter")
require Rails.root.join("lib/credentials_resolver")

Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
Expand Down Expand Up @@ -66,8 +67,7 @@
# Prepend all log lines with the following tags.
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: CredentialsResolver.redis_uri }

config.action_mailer.perform_caching = false

Expand Down

0 comments on commit 131fb03

Please sign in to comment.