mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
fix(server): re-enable Redis unix socket support (#1494)
This commit is contained in:
parent
6a852332de
commit
d0f8d8d1f9
@ -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<void> {
|
||||
const pubClient = createClient({
|
||||
url: `redis://${redisHost}:${redisPort}/${redisDb}`,
|
||||
password: redisPassword,
|
||||
database: redisDb,
|
||||
socket: {
|
||||
host: redisHost,
|
||||
port: redisPort,
|
||||
path: redisSocket,
|
||||
},
|
||||
});
|
||||
const subClient = pubClient.duplicate();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user