mirror of
https://github.com/fosrl/pangolin.git
synced 2025-06-24 06:08:48 +02:00
add redis conn to config
This commit is contained in:
parent
21f4623e3e
commit
139c9d2ce3
4 changed files with 420 additions and 288 deletions
|
@ -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"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue