feat(database): Implement read replicas for database

This commit is contained in:
Jesse Wierzbinski 2024-08-26 18:04:22 +02:00
parent c75306c58b
commit bc0943c569
No known key found for this signature in database
4 changed files with 106 additions and 19 deletions

View file

@ -33,6 +33,22 @@ export const configValidator = z.object({
username: z.string().min(1),
password: z.string().default(""),
database: z.string().min(1).default("versia"),
replicas: z
.array(
z.object({
host: z.string().min(1),
port: z
.number()
.int()
.min(1)
.max(2 ** 16 - 1)
.default(5432),
username: z.string().min(1),
password: z.string().default(""),
database: z.string().min(1).default("versia"),
}),
)
.optional(),
}),
redis: z.object({
queue: z