Update docker-compose.yml

add traefil labels to protect /metrics endpoint
This commit is contained in:
LRVT 2023-11-17 13:47:51 +01:00 committed by GitHub
parent 2d69d899b0
commit c683739fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,8 +41,14 @@ services:
# - traefik.enable=true # - traefik.enable=true
# - traefik.docker.network=proxy # - traefik.docker.network=proxy
# - traefik.http.routers.hedgedoc.rule=Host(`collab.example.com`) # - traefik.http.routers.hedgedoc.rule=Host(`collab.example.com`)
# - traefik.http.routers.hedgedoc.service=hedgedoc
# - traefik.http.services.hedgedoc.loadbalancer.server.port=3000 # - traefik.http.services.hedgedoc.loadbalancer.server.port=3000
# - traefik.http.routers.hedgedoc.middlewares=local-ipwhitelist@file # - traefik.http.routers.hedgedoc.middlewares=local-ipwhitelist@file
# # prevent unauthorized access to the /metrics endpoint
# - traefik.http.routers.hedgedoc-metrics.rule=Host(`collab.example.com`) && PathPrefix(`/metrics`)
# - traefik.http.routers.hedgedoc-metrics.service=hedgedoc
# - traefik.http.services.hedgedoc-metrics.loadbalancer.server.port=3000
# - traefik.http.routers.hedgedoc-metrics.middlewares=local-ipwhitelist@file
#networks: #networks:
# proxy: # proxy: