diff --git a/server/apps/immich/src/middlewares/redis-io.adapter.middleware.ts b/server/apps/immich/src/middlewares/redis-io.adapter.middleware.ts index dbb4eec3ce..9e385cb296 100644 --- a/server/apps/immich/src/middlewares/redis-io.adapter.middleware.ts +++ b/server/apps/immich/src/middlewares/redis-io.adapter.middleware.ts @@ -7,15 +7,20 @@ const redisHost = process.env.REDIS_HOSTNAME || 'immich_redis'; const redisPort = parseInt(process.env.REDIS_PORT || '6379'); const redisDb = parseInt(process.env.REDIS_DBINDEX || '0'); const redisPassword = process.env.REDIS_PASSWORD || undefined; -// const redisSocket = process.env.REDIS_SOCKET || undefined; +const redisSocket = process.env.REDIS_SOCKET || undefined; export class RedisIoAdapter extends IoAdapter { private adapterConstructor: any; async connectToRedis(): Promise { const pubClient = createClient({ - url: `redis://${redisHost}:${redisPort}/${redisDb}`, password: redisPassword, + database: redisDb, + socket: { + host: redisHost, + port: redisPort, + path: redisSocket, + }, }); const subClient = pubClient.duplicate();