From a5c199d397257b6c1f1778608a551b8ef8851795 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 13 Jan 2025 15:05:56 +1100 Subject: [PATCH 1/2] Set action cable to use the unused redis instance --- config/cable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cable.yml b/config/cable.yml index 26ba3b994f..272a67f19a 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -5,12 +5,12 @@ development: production: adapter: redis - url: <%= ENV.fetch("OFN_REDIS_URL", "redis://localhost:6380/0") %> + url: <%= ENV.fetch("OFN_REDIS_URL", "redis://localhost:6379/0") %> channel_prefix: your_application_production staging: adapter: redis - url: <%= ENV.fetch("OFN_REDIS_URL", "redis://localhost:6380/0") %> + url: <%= ENV.fetch("OFN_REDIS_URL", "redis://localhost:6379/0") %> channel_prefix: your_application_staging test: From a3e939e0acbddac0742865fc6e8806448da5082b Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Wed, 15 Jan 2025 10:59:29 +1100 Subject: [PATCH 2/2] Add OFN_REDIS_CABLE_URL env variable It lets us specify a redis url to be used with ActionCable --- .env.development | 1 + config/cable.yml | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.env.development b/.env.development index 94f1750d52..8742946d7c 100644 --- a/.env.development +++ b/.env.development @@ -16,6 +16,7 @@ SECRET_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" OFN_REDIS_URL="redis://localhost:6379/1" OFN_REDIS_JOBS_URL="redis://localhost:6379/2" +OFN_REDIS_CABLE_URL="redis://localhost:6379/0" SITE_URL="0.0.0.0:3000" diff --git a/config/cable.yml b/config/cable.yml index 272a67f19a..5bdf03640f 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -1,19 +1,19 @@ development: adapter: redis - url: <%= ENV.fetch("OFN_REDIS_URL", "redis://localhost:6379/1") %> + url: <%= ENV.fetch("OFN_REDIS_CABLE_URL", "redis://localhost:6379/1") %> channel_prefix: your_application_development production: adapter: redis - url: <%= ENV.fetch("OFN_REDIS_URL", "redis://localhost:6379/0") %> + url: <%= ENV.fetch("OFN_REDIS_CABLE_URL", "redis://localhost:6379/0") %> channel_prefix: your_application_production staging: adapter: redis - url: <%= ENV.fetch("OFN_REDIS_URL", "redis://localhost:6379/0") %> + url: <%= ENV.fetch("OFN_REDIS_CABLE_URL", "redis://localhost:6379/0") %> channel_prefix: your_application_staging test: adapter: redis - url: <%= ENV.fetch("OFN_REDIS_URL", "redis://localhost:6379/1") %> + url: <%= ENV.fetch("OFN_REDIS_CABLE_URL", "redis://localhost:6379/1") %> channel_prefix: your_application_test