2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_traefik_enabled %}
|
|
|
|
traefik.enable=true
|
|
|
|
|
|
|
|
{% if matrix_hookshot_container_labels_traefik_docker_network %}
|
|
|
|
traefik.docker.network={{ matrix_hookshot_container_labels_traefik_docker_network }}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-17 17:56:45 +02:00
|
|
|
traefik.http.services.matrix-hookshot-webhooks.loadbalancer.server.port={{ matrix_hookshot_webhook_port }}
|
|
|
|
traefik.http.services.matrix-hookshot-appservice.loadbalancer.server.port={{ matrix_hookshot_appservice_port }}
|
|
|
|
traefik.http.services.matrix-hookshot-widgets.loadbalancer.server.port={{ matrix_hookshot_widgets_port }}
|
|
|
|
traefik.http.services.matrix-hookshot-provisioning.loadbalancer.server.port={{ matrix_hookshot_provisioning_port }}
|
|
|
|
traefik.http.services.matrix-hookshot-metrics.loadbalancer.server.port={{ matrix_hookshot_metrics_port }}
|
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_webhooks_enabled %}
|
2024-01-15 10:41:15 +02:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Webhooks #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
traefik.http.middlewares.matrix-hookshot-webhooks-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_webhook_endpoint }}
|
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-webhooks.rule={{ matrix_hookshot_container_labels_webhooks_traefik_rule }}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-webhooks.middlewares=matrix-hookshot-webhooks-strip-prefix
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_webhooks_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-hookshot-webhooks.priority={{ matrix_hookshot_container_labels_webhooks_traefik_priority }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-webhooks.service=matrix-hookshot-webhooks
|
|
|
|
traefik.http.routers.matrix-hookshot-webhooks.entrypoints={{ matrix_hookshot_container_labels_webhooks_traefik_entrypoints }}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-webhooks.tls={{ matrix_hookshot_container_labels_webhooks_traefik_tls | to_json }}
|
|
|
|
{% if matrix_hookshot_container_labels_webhooks_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-hookshot-webhooks.tls.certResolver={{ matrix_hookshot_container_labels_webhooks_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Webhooks #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-02 17:10:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_appservice_enabled %}
|
2024-01-15 10:41:15 +02:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Appservice #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
traefik.http.middlewares.matrix-hookshot-appservice-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_appservice_endpoint }}
|
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-appservice.rule={{ matrix_hookshot_container_labels_appservice_traefik_rule }}
|
|
|
|
traefik.http.routers.matrix-hookshot-appservice.middlewares=matrix-hookshot-appservice-strip-prefix
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_appservice_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-hookshot-appservice.priority={{ matrix_hookshot_container_labels_appservice_traefik_priority }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-appservice.service=matrix-hookshot-appservice
|
|
|
|
traefik.http.routers.matrix-hookshot-appservice.entrypoints={{ matrix_hookshot_container_labels_appservice_traefik_entrypoints }}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-appservice.tls={{ matrix_hookshot_container_labels_appservice_traefik_tls | to_json }}
|
|
|
|
{% if matrix_hookshot_container_labels_appservice_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-hookshot-appservice.tls.certResolver={{ matrix_hookshot_container_labels_appservice_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Appservice #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-02 17:10:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_widgets_enabled %}
|
2024-01-15 10:41:15 +02:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Widgets #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
2024-01-19 17:08:14 +02:00
|
|
|
# Redirect `{PREFIX}/widgetapi/v1/static` to `{PREFIX}/widgetapi/v1/static/`.
|
|
|
|
# Hookshot does it too, but does not obey the prefix, which leads people elsewhere.
|
|
|
|
traefik.http.middlewares.matrix-hookshot-widgets-slashless-redirect.redirectregex.regex=({{ matrix_hookshot_widgets_endpoint | quote }}/v1/static)$
|
|
|
|
traefik.http.middlewares.matrix-hookshot-widgets-slashless-redirect.redirectregex.replacement=${1}/
|
|
|
|
|
2024-01-19 17:02:16 +02:00
|
|
|
traefik.http.middlewares.matrix-hookshot-widgets-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_public_endpoint }}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-widgets.rule={{ matrix_hookshot_container_labels_widgets_traefik_rule }}
|
2024-01-19 17:08:14 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-widgets.middlewares=matrix-hookshot-widgets-slashless-redirect,matrix-hookshot-widgets-strip-prefix
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_widgets_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-hookshot-widgets.priority={{ matrix_hookshot_container_labels_widgets_traefik_priority }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-widgets.service=matrix-hookshot-widgets
|
|
|
|
traefik.http.routers.matrix-hookshot-widgets.entrypoints={{ matrix_hookshot_container_labels_widgets_traefik_entrypoints }}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-widgets.tls={{ matrix_hookshot_container_labels_widgets_traefik_tls | to_json }}
|
|
|
|
{% if matrix_hookshot_container_labels_widgets_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-hookshot-widgets.tls.certResolver={{ matrix_hookshot_container_labels_widgets_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Widgets #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-02 17:10:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if matrix_hookshot_container_labels_provisioning_enabled %}
|
2024-01-15 10:41:15 +02:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Provisioning #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
traefik.http.middlewares.matrix-hookshot-provisioning-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_provisioning_endpoint }}
|
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-provisioning.rule={{ matrix_hookshot_container_labels_provisioning_traefik_rule }}
|
|
|
|
traefik.http.routers.matrix-hookshot-provisioning.middlewares=matrix-hookshot-provisioning-strip-prefix
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_provisioning_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-hookshot-provisioning.priority={{ matrix_hookshot_container_labels_provisioning_traefik_priority }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-provisioning.service=matrix-hookshot-provisioning
|
|
|
|
traefik.http.routers.matrix-hookshot-provisioning.entrypoints={{ matrix_hookshot_container_labels_provisioning_traefik_entrypoints }}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-provisioning.tls={{ matrix_hookshot_container_labels_provisioning_traefik_tls | to_json }}
|
|
|
|
{% if matrix_hookshot_container_labels_provisioning_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-hookshot-provisioning.tls.certResolver={{ matrix_hookshot_container_labels_provisioning_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Provisioning #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-02 17:10:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
{% if matrix_hookshot_container_labels_metrics_enabled %}
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Metrics #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% set metricsMiddlewares = ['matrix-hookshot-metrics-replace-path'] %}
|
|
|
|
traefik.http.middlewares.matrix-hookshot-metrics-replace-path.replacepath.path=/metrics
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_metrics_middleware_basic_auth_enabled %}
|
|
|
|
{% set metricsMiddlewares = metricsMiddlewares + ['matrix-hookshot-metrics-basic-auth'] %}
|
|
|
|
traefik.http.middlewares.matrix-hookshot-metrics-basic-auth.basicauth.users={{ matrix_hookshot_container_labels_metrics_middleware_basic_auth_users }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-metrics.rule={{ matrix_hookshot_container_labels_metrics_traefik_rule }}
|
|
|
|
traefik.http.routers.matrix-hookshot-metrics.middlewares={{ metricsMiddlewares | join(',') }}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% if matrix_hookshot_container_labels_metrics_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-hookshot-metrics.priority={{ matrix_hookshot_container_labels_metrics_traefik_priority }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-metrics.service=matrix-hookshot-metrics
|
|
|
|
traefik.http.routers.matrix-hookshot-metrics.entrypoints={{ matrix_hookshot_container_labels_metrics_traefik_entrypoints }}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
traefik.http.routers.matrix-hookshot-metrics.tls={{ matrix_hookshot_container_labels_metrics_traefik_tls | to_json }}
|
|
|
|
{% if matrix_hookshot_container_labels_metrics_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-hookshot-metrics.tls.certResolver={{ matrix_hookshot_container_labels_metrics_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Metrics #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-02 17:10:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-02 17:10:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ matrix_hookshot_container_labels_additional_labels }}
|