mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat(database): ✨ Implement read replicas for database
This commit is contained in:
parent
c75306c58b
commit
bc0943c569
4 changed files with 106 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue