separate media and database paths

The primary motivation for this change is to support databases that
don't take a path, e.g. out of process databases.

This configuration structure leaves the door open for other media
storage mechanisms in the future, such as S3.

It's also structured to avoid `#[serde(flatten)]` so that we can use
`#[serde(deny_unknown_fields)]`.
This commit is contained in:
Charles Hall 2025-02-28 10:56:08 -08:00
parent ae920fdbe8
commit 5a5608e088
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
6 changed files with 82 additions and 8 deletions

View file

@ -5,4 +5,8 @@ client.base_url = "https://matrix.example.com"
[database]
backend = "rocksdb"
path = "/var/lib/grapevine"
path = "/var/lib/grapevine/database"
[media.backend]
type = "filesystem"
path = "/var/lib/grapevine/media"

View file

@ -10,7 +10,11 @@ client.base_url = "https://matrix.example.com"
[database]
backend = "rocksdb"
path = "/var/lib/grapevine"
path = "/var/lib/grapevine/database"
[media.backend]
type = "filesystem"
path = "/var/lib/grapevine/media"
[federation]
enable = true