add redis conn to config

This commit is contained in:
miloschwartz 2025-06-13 16:42:15 -04:00
parent 21f4623e3e
commit 139c9d2ce3
No known key found for this signature in database
4 changed files with 420 additions and 288 deletions

View file

@ -131,6 +131,32 @@ export const configSchema = z.object({
.optional()
})
.optional(),
redis: z
.object({
enabled: z.boolean(),
host: z.string().optional(),
port: portSchema.optional(),
password: z.string().optional(),
db: z.number().int().nonnegative().optional().default(0),
tls: z
.object({
rejectUnauthorized: z.boolean().optional().default(true)
})
.optional()
})
.refine(
(redis) => {
if (!redis.enabled) {
return true;
}
return redis.host !== undefined && redis.port !== undefined;
},
{
message:
"If Redis is enabled, connection details must be provided"
}
)
.optional(),
traefik: z
.object({
http_entrypoint: z.string().optional().default("web"),