From b651495c076ffd9379a729514953bca5f6b75be1 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 7 Jan 2024 12:48:48 +0200 Subject: [PATCH] Fixups for maubot and appservice-slack container labels --- roles/custom/matrix-bot-maubot/templates/labels.j2 | 4 ++-- .../custom/matrix-bridge-appservice-slack/defaults/main.yml | 2 +- .../matrix-bridge-appservice-slack/templates/labels.j2 | 6 +++--- .../templates/systemd/matrix-appservice-slack.service.j2 | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/roles/custom/matrix-bot-maubot/templates/labels.j2 b/roles/custom/matrix-bot-maubot/templates/labels.j2 index b375a12e3..2930e058c 100644 --- a/roles/custom/matrix-bot-maubot/templates/labels.j2 +++ b/roles/custom/matrix-bot-maubot/templates/labels.j2 @@ -11,13 +11,13 @@ traefik.http.routers.matrix-bot-maubot-management.rule={{ matrix_bot_maubot_cont {% if matrix_bot_maubot_container_labels_management_traefik_priority | int > 0 %} traefik.http.routers.matrix-bot-maubot-management.priority={{ matrix_bot_maubot_container_labels_management_traefik_priority }} {% endif %} -traefik.http.routers.matrix-bot-maubot-management.service=matrix-mautrix-facebook-appservice +traefik.http.routers.matrix-bot-maubot-management.service=matrix-bot-maubot traefik.http.routers.matrix-bot-maubot-management.entrypoints={{ matrix_bot_maubot_container_labels_management_traefik_entrypoints }} traefik.http.routers.matrix-bot-maubot-management.tls={{ matrix_bot_maubot_container_labels_management_traefik_tls | to_json }} {% if matrix_bot_maubot_container_labels_management_traefik_tls %} traefik.http.routers.matrix-bot-maubot-management.tls.certResolver={{ matrix_bot_maubot_container_labels_management_traefik_tls_certResolver }} {% endif %} -traefik.http.services.matrix-mautrix-facebook-appservice.loadbalancer.server.port={{ matrix_bot_maubot_server_port }} +traefik.http.services.matrix-bot-maubot.loadbalancer.server.port={{ matrix_bot_maubot_server_port }} {% endif %} {% endif %} diff --git a/roles/custom/matrix-bridge-appservice-slack/defaults/main.yml b/roles/custom/matrix-bridge-appservice-slack/defaults/main.yml index d3bf4a98f..20b12b721 100644 --- a/roles/custom/matrix-bridge-appservice-slack/defaults/main.yml +++ b/roles/custom/matrix-bridge-appservice-slack/defaults/main.yml @@ -57,7 +57,7 @@ matrix_appservice_slack_container_labels_traefik_docker_network: "{{ matrix_apps matrix_appservice_slack_container_labels_traefik_entrypoints: web-secure matrix_appservice_slack_container_labels_traefik_tls_certResolver: default # noqa var-naming -# Controls whether labels will be added that expose maubot's management endpoints +# Controls whether labels will be added that expose matrix-appservice-slack's public endpoints matrix_appservice_slack_container_labels_public_endpoint_enabled: true matrix_appservice_slack_container_labels_public_endpoint_hostname: "{{ matrix_appservice_slack_hostname }}" matrix_appservice_slack_container_labels_public_endpoint_prefix: "{{ matrix_appservice_slack_path_prefix }}" diff --git a/roles/custom/matrix-bridge-appservice-slack/templates/labels.j2 b/roles/custom/matrix-bridge-appservice-slack/templates/labels.j2 index 3046c01ec..e58ab91c9 100644 --- a/roles/custom/matrix-bridge-appservice-slack/templates/labels.j2 +++ b/roles/custom/matrix-bridge-appservice-slack/templates/labels.j2 @@ -5,19 +5,19 @@ traefik.enable=true traefik.docker.network={{ matrix_appservice_slack_container_labels_traefik_docker_network }} {% endif %} -{# Management #} +{# Public #} {% if matrix_appservice_slack_container_labels_public_endpoint_enabled %} traefik.http.routers.matrix-appservice-slack-public-endpoint.rule={{ matrix_appservice_slack_container_labels_public_endpoint_traefik_rule }} {% if matrix_appservice_slack_container_labels_public_endpoint_traefik_priority | int > 0 %} traefik.http.routers.matrix-appservice-slack-public-endpoint.priority={{ matrix_appservice_slack_container_labels_public_endpoint_traefik_priority }} {% endif %} -traefik.http.routers.matrix-appservice-slack-public-endpoint.service=matrix-mautrix-facebook-appservice +traefik.http.routers.matrix-appservice-slack-public-endpoint.service=matrix-appservice-slack traefik.http.routers.matrix-appservice-slack-public-endpoint.entrypoints={{ matrix_appservice_slack_container_labels_public_endpoint_traefik_entrypoints }} traefik.http.routers.matrix-appservice-slack-public-endpoint.tls={{ matrix_appservice_slack_container_labels_public_endpoint_traefik_tls | to_json }} {% if matrix_appservice_slack_container_labels_public_endpoint_traefik_tls %} traefik.http.routers.matrix-appservice-slack-public-endpoint.tls.certResolver={{ matrix_appservice_slack_container_labels_public_endpoint_traefik_tls_certResolver }} {% endif %} -traefik.http.services.matrix-mautrix-facebook-appservice.loadbalancer.server.port={{ matrix_appservice_slack_slack_port }} +traefik.http.services.matrix-appservice-slack.loadbalancer.server.port={{ matrix_appservice_slack_slack_port }} {% endif %} {% endif %} diff --git a/roles/custom/matrix-bridge-appservice-slack/templates/systemd/matrix-appservice-slack.service.j2 b/roles/custom/matrix-bridge-appservice-slack/templates/systemd/matrix-appservice-slack.service.j2 index c97a227c5..cafbaa72d 100644 --- a/roles/custom/matrix-bridge-appservice-slack/templates/systemd/matrix-appservice-slack.service.j2 +++ b/roles/custom/matrix-bridge-appservice-slack/templates/systemd/matrix-appservice-slack.service.j2 @@ -31,6 +31,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ {% endif %} --mount type=bind,src={{ matrix_appservice_slack_config_path }},dst=/config \ --mount type=bind,src={{ matrix_appservice_slack_data_path }},dst=/data \ + --label-file={{ matrix_appservice_slack_base_path }}/labels \ {% for arg in matrix_appservice_slack_container_extra_arguments %} {{ arg }} \ {% endfor %}