mirror of
https://github.com/versia-pub/server.git
synced 2026-03-12 21:39:15 +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
|
|
@ -10,6 +10,14 @@ username = "versia"
|
|||
password = "mycoolpassword"
|
||||
database = "versia"
|
||||
|
||||
# Add any eventual read-only database replicas here
|
||||
# [[database.replicas]]
|
||||
# host = "other-host"
|
||||
# port = 5432
|
||||
# username = "versia"
|
||||
# password = "mycoolpassword2"
|
||||
# database = "replica1"
|
||||
|
||||
[redis.queue]
|
||||
# Redis instance for storing the federation queue
|
||||
# Required for federation
|
||||
|
|
|
|||
|
|
@ -27,6 +27,39 @@
|
|||
"type": "string",
|
||||
"minLength": 1,
|
||||
"default": "versia"
|
||||
},
|
||||
"replicas": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535,
|
||||
"default": 5432
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"database": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"default": "versia"
|
||||
}
|
||||
},
|
||||
"required": ["host", "username"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["username"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue