Compare commits

...

8 Commits

5 changed files with 19 additions and 4 deletions

View File

@ -63,6 +63,7 @@ COMPOSE_FILE="compose.yml"
## Enable prometheus metrics collection ## Enable prometheus metrics collection
## used used by the coop-cloud monitoring stack ## used used by the coop-cloud monitoring stack
#COMPOSE_FILE="$COMPOSE_FILE:compose.metrics.yml"
#METRICS_ENABLED=1 #METRICS_ENABLED=1
##################################################################### #####################################################################

View File

@ -1,3 +1,3 @@
export TRAEFIK_YML_VERSION=v16 export TRAEFIK_YML_VERSION=v17
export FILE_PROVIDER_YML_VERSION=v7 export FILE_PROVIDER_YML_VERSION=v8
export ENTRYPOINT_VERSION=v2 export ENTRYPOINT_VERSION=v2

9
compose.metrics.yml Normal file
View File

@ -0,0 +1,9 @@
version: "3.8"
services:
app:
environment:
- METRICS_ENABLED
ports:
- target: 8082
published: 8082
mode: host

View File

@ -3,7 +3,7 @@ version: "3.8"
services: services:
app: app:
image: "traefik:v2.10.1" image: "traefik:v2.10.4"
# Note(decentral1se): *please do not* add any additional ports here. # Note(decentral1se): *please do not* add any additional ports here.
# Doing so could break new installs with port conflicts. Please use # Doing so could break new installs with port conflicts. Please use
# the usual `compose.$app.yml` approach for any additional ports # the usual `compose.$app.yml` approach for any additional ports
@ -47,7 +47,7 @@ services:
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.service=api@internal" - "traefik.http.routers.${STACK_NAME}.service=api@internal"
- "traefik.http.routers.${STACK_NAME}.middlewares=security@file" - "traefik.http.routers.${STACK_NAME}.middlewares=security@file"
- "coop-cloud.${STACK_NAME}.version=2.2.0+v2.10.2" - "coop-cloud.${STACK_NAME}.version=2.4.2+v2.10.4"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}" - "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
networks: networks:

View File

@ -67,6 +67,9 @@ entrypoints:
{{ if eq (env "METRICS_ENABLED") "1" }} {{ if eq (env "METRICS_ENABLED") "1" }}
metrics: metrics:
address: ":8082" address: ":8082"
http:
middlewares:
- basicauth@file
{{ end }} {{ end }}
{{ if eq (env "MATRIX_FEDERATION_ENABLED") "1" }} {{ if eq (env "MATRIX_FEDERATION_ENABLED") "1" }}
matrix-federation: matrix-federation:
@ -80,6 +83,8 @@ ping:
metrics: metrics:
prometheus: prometheus:
entryPoint: metrics entryPoint: metrics
addRoutersLabels: true
addServicesLabels: true
{{ end }} {{ end }}
certificatesResolvers: certificatesResolvers: