diff --git a/.env.sample b/.env.sample index 0e0c3c9..62c6352 100644 --- a/.env.sample +++ b/.env.sample @@ -63,6 +63,7 @@ COMPOSE_FILE="compose.yml" ## Enable prometheus metrics collection ## used used by the coop-cloud monitoring stack +#COMPOSE_FILE="$COMPOSE_FILE:compose.metrics.yml" #METRICS_ENABLED=1 ##################################################################### diff --git a/abra.sh b/abra.sh index 6f44e73..fcae9d8 100644 --- a/abra.sh +++ b/abra.sh @@ -1,3 +1,3 @@ -export TRAEFIK_YML_VERSION=v16 +export TRAEFIK_YML_VERSION=v17 export FILE_PROVIDER_YML_VERSION=v8 export ENTRYPOINT_VERSION=v2 diff --git a/compose.metrics.yml b/compose.metrics.yml new file mode 100644 index 0000000..35765fb --- /dev/null +++ b/compose.metrics.yml @@ -0,0 +1,7 @@ +version: "3.8" +services: + app: + environment: + - METRICS_ENABLED + ports: + - "8082:8082" diff --git a/traefik.yml.tmpl b/traefik.yml.tmpl index 59e7c39..b734a8a 100644 --- a/traefik.yml.tmpl +++ b/traefik.yml.tmpl @@ -67,6 +67,9 @@ entrypoints: {{ if eq (env "METRICS_ENABLED") "1" }} metrics: address: ":8082" + http: + middlewares: + - basicauth@file {{ end }} {{ if eq (env "MATRIX_FEDERATION_ENABLED") "1" }} matrix-federation: @@ -80,6 +83,8 @@ ping: metrics: prometheus: entryPoint: metrics + addRoutersLabels: true + addServicesLabels: true {{ end }} certificatesResolvers: