setup metrics route for forgejo

This commit is contained in:
Jef Roosens 2026-04-20 21:59:19 +02:00
parent 5f4d69ff17
commit 7cc84ccc2c
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
3 changed files with 18 additions and 1 deletions

View file

@ -123,4 +123,4 @@ ENABLED = true
SCHEDULE = @weekly SCHEDULE = @weekly
[metrics] [metrics]
enabled = true ENABLED = true

View file

@ -2,4 +2,18 @@
reverse_proxy localhost:{{ forgejo_http_port }} { reverse_proxy localhost:{{ forgejo_http_port }} {
header_down +X-Robots-Tag "none" header_down +X-Robots-Tag "none"
} }
route /metrics {
@local {
remote_ip 127.0.0.1 ::1
}
handle @local {
reverse_proxy localhost:{{ forgejo_http_port }}
}
handle {
respond "Not Found" 404
}
}
} }

View file

@ -110,3 +110,6 @@ JWT_SECRET = {{ gitea_jwt_secret }}
[other] [other]
SHOW_FOOTER_VERSION = false SHOW_FOOTER_VERSION = false
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false SHOW_FOOTER_TEMPLATE_LOAD_TIME = false
[metrics]
enabled = true