mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(server): support IPv6 Redis instances
This enables automatic family affinity by using `0`, which overwrites ioredis' default set to `4`. With this change, Immich will be able to connect to Redis exposed only via IPv6. Users will still be able to overwrite the default with `REDIS_IP_FAMILY` or by adding `?family=4` to `REDIS_URL`.
This commit is contained in:
parent
8fe54a4de1
commit
718878cad0
4 changed files with 20 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Transform, Type } from 'class-transformer';
|
||||
import { IsEnum, IsInt, IsString, Matches } from 'class-validator';
|
||||
import { IsEnum, IsIn, IsInt, IsString, Matches } from 'class-validator';
|
||||
import { DatabaseSslMode, ImmichEnvironment, LogLevel } from 'src/enum';
|
||||
import { IsIPRange, Optional, ValidateBoolean } from 'src/validation';
|
||||
|
||||
|
|
@ -195,4 +195,9 @@ export class EnvDto {
|
|||
@IsString()
|
||||
@Optional()
|
||||
REDIS_URL?: string;
|
||||
|
||||
@IsIn([0, 4, 6])
|
||||
@Optional()
|
||||
@Type(() => Number)
|
||||
REDIS_IP_FAMILY?: 0 | 4 | 6;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue