mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-08-22 00:23:17 +00:00
Point LiveKit JWT Service at our homeserver directly, instead of having it discover it
lk-jwt-service v0.6.0 stopped honoring the delay_cs_api_url request parameter and now locates a user's Client-Server API by fetching the /.well-known/matrix/client file of that user's base domain itself. For our own homeserver, this makes the service leave the server over the public network only to come back to it, which is wasteful at best and does not work at all where the base domain is not reachable from the host. Since we know where our homeserver is, we tell the service directly via the new LIVEKIT_CS_API_URL_OVERRIDES environment variable. Federated homeservers keep being resolved through discovery. The service now also joins the container network that the homeserver's Client-Server API is reachable on, like our other add-on services do. It used to only be connected to it by coincidence, via the reverse-proxy network, which left it unable to reach the homeserver when the playbook is not managing Traefik. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1127365126
commit
ddd99ba244
@@ -6659,6 +6659,8 @@ matrix_livekit_jwt_service_container_network: "{{ matrix_addons_container_networ
|
||||
|
||||
matrix_livekit_jwt_service_container_additional_networks_auto: |
|
||||
{{
|
||||
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
|
||||
+
|
||||
([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_livekit_jwt_service_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [])
|
||||
}}
|
||||
|
||||
@@ -6669,6 +6671,13 @@ matrix_livekit_jwt_service_container_labels_traefik_tls_certResolver: "{{ traefi
|
||||
|
||||
matrix_livekit_jwt_service_environment_variable_livekit_url: "{{ livekit_server_websocket_public_url }}"
|
||||
|
||||
# The service discovers where a homeserver's Client-Server API lives by fetching the `/.well-known/matrix/client`
|
||||
# file of that homeserver's base domain over the public network.
|
||||
# For our own homeserver, we already know the answer and can spare it the round trip, which would otherwise
|
||||
# need to leave the server and come back to it.
|
||||
# Other (federated) homeservers are still resolved via discovery.
|
||||
matrix_livekit_jwt_service_environment_variable_livekit_cs_api_url_overrides_map_auto: "{{ {matrix_domain: matrix_addons_homeserver_client_api_url} }}"
|
||||
|
||||
matrix_livekit_jwt_service_environment_variable_livekit_key: "{{ (matrix_homeserver_generic_secret_key + ':lk.key') | hash('sha512') | to_uuid }}"
|
||||
|
||||
matrix_livekit_jwt_service_environment_variable_livekit_secret: "{{ (matrix_homeserver_generic_secret_key + ':lk.secret') | hash('sha512') | to_uuid }}"
|
||||
|
||||
Reference in New Issue
Block a user