mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-07-17 15:26:41 +00:00
Support readonly datastores for matrix-media-repo
The configuration template only rendered a datastore when its for_kinds list was non-empty, even though the inline documentation (matching upstream's) describes forKinds: [] as the way to make a datastore readonly. That made the documented migration scenario impossible: moving media between the file and s3 datastores while keeping the old one readable. Introduce matrix_media_repo_datastore_file_enabled and matrix_media_repo_datastore_s3_enabled, which default to the previous kinds-based behavior. A readonly datastore is now expressed by enabling the datastore explicitly while assigning it no kinds. Fixes #4303 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -198,7 +198,7 @@ sharedSecretAuth:
|
||||
# thumbnails and other misc data is also stored in these places. The media repo, when looking
|
||||
# for a datastore to use, will always use the smallest datastore first.
|
||||
datastores:
|
||||
{% if (matrix_media_repo_datastore_file_for_kinds | length) > 0 %}
|
||||
{% if matrix_media_repo_datastore_file_enabled %}
|
||||
- type: file
|
||||
# ID for this datastore (cannot change). Alphanumeric recommended.
|
||||
id: {{ matrix_media_repo_datastore_file_id | to_json }}
|
||||
@@ -218,7 +218,7 @@ datastores:
|
||||
opts:
|
||||
path: {{ matrix_media_repo_datastore_opts_path | to_json }}
|
||||
{% endif %}
|
||||
{% if (matrix_media_repo_datastore_s3_for_kinds | length) > 0 %}
|
||||
{% if matrix_media_repo_datastore_s3_enabled %}
|
||||
- type: s3
|
||||
# ID for this datastore (cannot change). Alphanumeric recommended.
|
||||
id: {{ matrix_media_repo_datastore_s3_id | to_json }}
|
||||
|
||||
Reference in New Issue
Block a user