4
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2026-06-30 15:31:18 +00:00
Files
matrix-docker-ansible-deploy/roles/custom/matrix-bridge-mautrix-slack/templates/labels.j2
T
Slavi Pantaleev 2879a01105 mautrix-slack: expose bridge HTTP API (for mautrix-manager and similar)
Unlike the other mautrix bridges, the mautrix-slack role had no Traefik
label infrastructure at all, so this builds the scaffold first (a new
labels.j2, the container_labels_traefik_* vars, the label-file wiring in
the systemd service and setup_install.yml, and the group_vars wiring),
then exposes the bridge's appservice HTTP API under
https://matrix.<domain>/bridges/slack like the other bridges.

The provisioning shared secret was already auto-generated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 09:08:57 +03:00

51 lines
2.3 KiB
Django/Jinja

{#
SPDX-FileCopyrightText: 2026 Slavi Pantaleev
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{% if matrix_mautrix_slack_container_labels_traefik_enabled %}
traefik.enable=true
{% if matrix_mautrix_slack_container_labels_traefik_docker_network %}
traefik.docker.network={{ matrix_mautrix_slack_container_labels_traefik_docker_network }}
{% endif %}
{% if matrix_mautrix_slack_container_labels_exposure_enabled %}
############################################################
# #
# Bridge API exposure #
# #
############################################################
traefik.http.services.matrix-mautrix-slack-exposure.loadbalancer.server.port=8080
traefik.http.middlewares.matrix-mautrix-slack-exposure-strip-prefix.stripprefix.prefixes={{ matrix_mautrix_slack_exposure_path_prefix }}
traefik.http.routers.matrix-mautrix-slack-exposure.middlewares=matrix-mautrix-slack-exposure-strip-prefix
traefik.http.routers.matrix-mautrix-slack-exposure.rule={{ matrix_mautrix_slack_container_labels_exposure_traefik_rule }}
{% if matrix_mautrix_slack_container_labels_exposure_traefik_priority | int > 0 %}
traefik.http.routers.matrix-mautrix-slack-exposure.priority={{ matrix_mautrix_slack_container_labels_exposure_traefik_priority }}
{% endif %}
traefik.http.routers.matrix-mautrix-slack-exposure.service=matrix-mautrix-slack-exposure
traefik.http.routers.matrix-mautrix-slack-exposure.entrypoints={{ matrix_mautrix_slack_container_labels_exposure_traefik_entrypoints }}
traefik.http.routers.matrix-mautrix-slack-exposure.tls={{ matrix_mautrix_slack_container_labels_exposure_traefik_tls | to_json }}
{% if matrix_mautrix_slack_container_labels_exposure_traefik_tls %}
traefik.http.routers.matrix-mautrix-slack-exposure.tls.certResolver={{ matrix_mautrix_slack_container_labels_exposure_traefik_tls_certResolver }}
{% endif %}
############################################################
# #
# /Bridge API exposure #
# #
############################################################
{% endif %}
{% endif %}
{{ matrix_mautrix_slack_container_labels_additional_labels }}