mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-01-10 21:33:52 +00:00
1cc2ff8a0e
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
43 lines
2.3 KiB
Django/Jinja
43 lines
2.3 KiB
Django/Jinja
{#
|
|
SPDX-FileCopyrightText: 2024 MDAD Team and contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#}
|
|
|
|
{% if matrix_prometheus_nginxlog_exporter_container_labels_traefik_enabled %}
|
|
traefik.enable=true
|
|
|
|
{% if matrix_prometheus_nginxlog_exporter_container_labels_traefik_docker_network %}
|
|
traefik.docker.network={{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_docker_network }}
|
|
{% endif %}
|
|
|
|
traefik.http.services.{{ matrix_prometheus_nginxlog_exporter_identifier }}.loadbalancer.server.port={{ matrix_prometheus_nginxlog_exporter_container_metrics_port }}
|
|
|
|
{% set middlewares = [] %}
|
|
|
|
{% if matrix_prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_enabled %}
|
|
{% set middlewares = middlewares + [matrix_prometheus_nginxlog_exporter_identifier + '-basic-auth'] %}
|
|
traefik.http.middlewares.{{ matrix_prometheus_nginxlog_exporter_identifier }}-basic-auth.basicauth.users={{ matrix_prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_users }}
|
|
{% endif %}
|
|
|
|
{% set middlewares = middlewares + [matrix_prometheus_nginxlog_exporter_identifier + '-replacepath'] %}
|
|
traefik.http.middlewares.{{ matrix_prometheus_nginxlog_exporter_identifier }}-replacepath.replacepath.path=/metrics
|
|
|
|
traefik.http.routers.{{ matrix_prometheus_nginxlog_exporter_identifier }}.rule={{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_rule }}
|
|
|
|
{% if middlewares | length > 0 %}
|
|
traefik.http.routers.{{ matrix_prometheus_nginxlog_exporter_identifier }}.middlewares={{ middlewares | join(',') }}
|
|
{% endif %}
|
|
|
|
traefik.http.routers.{{ matrix_prometheus_nginxlog_exporter_identifier }}.service={{ matrix_prometheus_nginxlog_exporter_identifier }}
|
|
traefik.http.routers.{{ matrix_prometheus_nginxlog_exporter_identifier }}.entrypoints={{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_entrypoints }}
|
|
|
|
|
|
traefik.http.routers.{{ matrix_prometheus_nginxlog_exporter_identifier }}.tls={{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_tls | to_json }}
|
|
{% if matrix_prometheus_nginxlog_exporter_container_labels_traefik_tls %}
|
|
traefik.http.routers.{{ matrix_prometheus_nginxlog_exporter_identifier }}.tls.certResolver={{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_tls_certResolver }}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{{ matrix_prometheus_nginxlog_exporter_container_labels_additional_labels }}
|