From d718d26b57b6364c082244464adff17d48a8f396 Mon Sep 17 00:00:00 2001 From: AkDk7 Date: Sat, 10 Jan 2026 12:01:44 +0100 Subject: [PATCH] If redis ist enabled for matrix media repo it failes to connect to valkey due to inproper configuration. --- group_vars/matrix_servers | 2 ++ roles/custom/matrix-media-repo/defaults/main.yml | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 06ccd0952..993b6523f 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -3648,6 +3648,8 @@ matrix_media_repo_container_additional_networks: | ([postgres_container_network] if (postgres_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_media_repo_container_network) else []) + ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_media_repo_container_labels_traefik_enabled) else []) + + + ([valkey_container_network] if valkey_enabled else []) ) | unique }} diff --git a/roles/custom/matrix-media-repo/defaults/main.yml b/roles/custom/matrix-media-repo/defaults/main.yml index c2485207e..8d1573272 100755 --- a/roles/custom/matrix-media-repo/defaults/main.yml +++ b/roles/custom/matrix-media-repo/defaults/main.yml @@ -891,17 +891,19 @@ matrix_media_repo_plugins: matrix_media_repo_redis_enabled: false # The database number to use. Leave at zero if using a dedicated Redis instance. -matrix_media_repo_redis_database_number: 0 +# Use next redis index since Synapse is on 0. You can chose between index 0 and 15. +matrix_media_repo_redis_database_number: 1 # The Redis shards that should be used by the media repo in the ring. The names of the # shards are for your reference and have no bearing on the connection, but must be unique. +# As default it uses the valkey instance provided by this project matrix_media_repo_redis_shards: - - name: "server1" - addr: ":7000" - - name: "server2" - addr: ":7001" - - name: "server3" - addr: ":7002" + - name: "valkey" + addr: "{{ valkey_identifier }}:{{ valkey_container_http_port }}" +# - name: "server2" +# addr: ":7001" +# - name: "server3" +# addr: ":7002" # Optional sentry (https://sentry.io/) configuration for the media repo