From 01ba5f48b8973fef557cbee630c1e88a90878d3a Mon Sep 17 00:00:00 2001 From: GameDog9988 Date: Tue, 3 Oct 2023 12:33:28 -0400 Subject: [PATCH] feat: use REDIS_PRIVATE_URL --- apps/server/src/redis.ts | 9 ++++++++- turbo.json | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/server/src/redis.ts b/apps/server/src/redis.ts index 0fd14995..5a4ca267 100644 --- a/apps/server/src/redis.ts +++ b/apps/server/src/redis.ts @@ -1,6 +1,13 @@ import Redis from "ioredis"; -const redis = new Redis(process.env.REDIS_URL ?? ""); +const redis = new Redis( + process.env.REDIS_PRIVATE_URL ?? process.env.REDIS_URL ?? "", + { + tls: { + rejectUnauthorized: false, + }, + } +); // Listen to connection events to prevent TCP Issue // https://github.com/redis/ioredis/issues/1203 diff --git a/turbo.json b/turbo.json index 231e6981..7435a4f4 100644 --- a/turbo.json +++ b/turbo.json @@ -17,6 +17,7 @@ "DATABASE_URL", "POSTGRES_URL", "SESSION_COOKIE_DOMAIN", + "REDIS_PRIVATE_URL", "REDIS_URL", "PORT", "NODE_ENV",