1
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2024-12-12 08:43:55 +02:00
matrix-docker-ansible-deploy/roles/custom/matrix-bridge-heisenbridge/templates/labels.j2
Slavi Pantaleev 9d11271d59 Initial (not yet enabled) work on Heisenbridge handling media requests at matrix.DOMAIN/heisenbridge/*
Related to:

- https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3470
- https://github.com/hifi/heisenbridge/releases/tag/v1.15.0

During testing, it appears that Heisenbridge generated media URLs
that look like this: `{media_url}/_matrix/media/v3/download/DOMAIN/FILE_ID/FILE_NAME`.

This seems off. We were expecting `{media_url}/_heisenbridge/media/something`
(e.g. `https://matrix.DOMAIN/heisenbridge/_heisenbridge/media/something`, leading to its own media proxy),
but Heisenbridge still seems to be generating URLs destined for the homeserver's Media API.

Until we figure out why that is, `media_url` remains pointed to the homeserver URL (just like before),
so that the bot can continue operating like before.
2024-08-10 06:22:59 +03:00

53 lines
2.5 KiB
Django/Jinja

{% if matrix_heisenbridge_container_labels_traefik_enabled %}
traefik.enable=true
{% if matrix_heisenbridge_container_labels_traefik_docker_network %}
traefik.docker.network={{ matrix_heisenbridge_container_labels_traefik_docker_network }}
{% endif %}
traefik.http.services.matrix-heisenbridge.loadbalancer.server.port=9898
{% set middlewares = [] %}
{% if matrix_heisenbridge_container_labels_traefik_path_prefix != '/' %}
traefik.http.middlewares.matrix-heisenbridge-strip-prefix.stripprefix.prefixes={{ matrix_heisenbridge_container_labels_traefik_path_prefix }}
{% set middlewares = middlewares + ['matrix-heisenbridge-strip-prefix'] %}
{% endif %}
{% if matrix_heisenbridge_container_labels_traefik_media_enabled %}
##########################################################################
# #
# Media #
# #
##########################################################################
traefik.http.routers.matrix-heisenbridge-media.rule={{ matrix_heisenbridge_container_labels_traefik_media_rule }}
{% if matrix_heisenbridge_container_labels_traefik_media_priority | int > 0 %}
traefik.http.routers.matrix-heisenbridge-media.priority={{ matrix_heisenbridge_container_labels_traefik_media_priority }}
{% endif %}
{% if middlewares | length > 0 %}
traefik.http.routers.matrix-heisenbridge-media.middlewares={{ middlewares | join(',') }}
{% endif %}
traefik.http.routers.matrix-heisenbridge-media.service=matrix-heisenbridge
traefik.http.routers.matrix-heisenbridge-media.entrypoints={{ matrix_heisenbridge_container_labels_traefik_entrypoints }}
traefik.http.routers.matrix-heisenbridge-media.tls={{ matrix_heisenbridge_container_labels_traefik_media_tls | to_json }}
{% if matrix_heisenbridge_container_labels_traefik_media_entrypoints %}
traefik.http.routers.matrix-heisenbridge-media.tls.certResolver={{ matrix_heisenbridge_container_labels_traefik_media_tls_certResolver }}
{% endif %}
##########################################################################
# #
# /Media #
# #
##########################################################################
{% endif %}
{% endif %}
{{ matrix_heisenbridge_container_labels_additional_labels }}