* fix: skip env validation in dockerfile not working * fix: skip env validation in dockerfile not working * fix: remove linux/arm/v7 for now as node commands are run forever * fix: remove cache because it is to big? * refactor: remove redis log transport during build * fix: add more checks for conditional redis connection * fix: docker build not working locally * refactor: move base image to debian * chore: add arm v7 platform support * fix: remove armv7 support as not supported by turbo * chore: profile amd64 build * chore: enable webpack logging * chore: disable linux/arm64 for now * chore: remove profiling from build in dockerfile * chore: revert to node alpine image
15 lines
361 B
TypeScript
15 lines
361 B
TypeScript
import { Redis } from "ioredis";
|
|
|
|
/**
|
|
* Creates a new Redis connection
|
|
* @returns redis client
|
|
*/
|
|
export const createRedisConnection = () => {
|
|
if (Boolean(process.env.CI) || Boolean(process.env.DISABLE_REDIS_LOGS)) {
|
|
// Return null if we are in CI as we don't want to connect to Redis
|
|
return null as unknown as Redis;
|
|
}
|
|
|
|
return new Redis();
|
|
};
|