Skip to content

Commit

Permalink
feat: use REDIS_PRIVATE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
agrattan0820 committed Oct 3, 2023
1 parent 2e3f5f5 commit 01ba5f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/server/src/redis.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"DATABASE_URL",
"POSTGRES_URL",
"SESSION_COOKIE_DOMAIN",
"REDIS_PRIVATE_URL",
"REDIS_URL",
"PORT",
"NODE_ENV",
Expand Down

0 comments on commit 01ba5f4

Please sign in to comment.