mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-01-12 11:00:27 +00:00
Automatically integate matrix-media-repo with Valkey (if enabled) (#4851)
* This push request is about handling Traefik ipallowlist to synapse-admin application. It's my first push request. If I forgot something please let me know. :-) * Changed position of variable and naming for better expandebility of traefik options * Remove useless `noqa var-naming` comment and too many blank lines at the end of the file * If redis ist enabled for matrix media repo it failes to connect to valkey due to inproper configuration. * Updated solution for fixing MMR redis connection * Clean up * Update valkey_container_network condition --------- Co-authored-by: AkDk7 <joerg@pannbacker.email> Co-authored-by: Slavi Pantaleev <slavi@devture.com>
This commit is contained in:
@@ -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 [])
|
([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 [])
|
([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 and matrix_media_repo_redis_enabled else [])
|
||||||
) | unique
|
) | unique
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@@ -3713,6 +3715,21 @@ matrix_media_repo_homeservers_auto:
|
|||||||
|
|
||||||
matrix_media_repo_homeserver_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
|
matrix_media_repo_homeserver_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
|
||||||
|
|
||||||
|
matrix_media_repo_redis_enabled: "{{ valkey_enabled }}"
|
||||||
|
|
||||||
|
# Use next redis index since Synapse is on 0. You can chose between index 0 and 15.
|
||||||
|
matrix_media_repo_redis_database_number: 1
|
||||||
|
|
||||||
|
matrix_media_repo_redis_shards: |
|
||||||
|
{{
|
||||||
|
([{
|
||||||
|
'name': 'valkey',
|
||||||
|
'addr': (valkey_identifier + valkey_container_http_port | string),
|
||||||
|
}])
|
||||||
|
if valkey_enabled and matrix_media_repo_redis_enabled
|
||||||
|
else []
|
||||||
|
}}
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# /matrix-media-repo
|
# /matrix-media-repo
|
||||||
|
|||||||
@@ -895,13 +895,7 @@ matrix_media_repo_redis_database_number: 0
|
|||||||
|
|
||||||
# The Redis shards that should be used by the media repo in the ring. The names of the
|
# 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.
|
# shards are for your reference and have no bearing on the connection, but must be unique.
|
||||||
matrix_media_repo_redis_shards:
|
matrix_media_repo_redis_shards: []
|
||||||
- name: "server1"
|
|
||||||
addr: ":7000"
|
|
||||||
- name: "server2"
|
|
||||||
addr: ":7001"
|
|
||||||
- name: "server3"
|
|
||||||
addr: ":7002"
|
|
||||||
|
|
||||||
# Optional sentry (https://sentry.io/) configuration for the media repo
|
# Optional sentry (https://sentry.io/) configuration for the media repo
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user