mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 07:15:37 +00:00
enable gitea metrics
This commit is contained in:
parent
b589ba5d8a
commit
dfd52e2cd5
@ -9,6 +9,7 @@ in {
|
|||||||
database.type = "sqlite3";
|
database.type = "sqlite3";
|
||||||
settings = {
|
settings = {
|
||||||
actions.ENABLED = true;
|
actions.ENABLED = true;
|
||||||
|
metrics.ENABLED = true;
|
||||||
repository = {
|
repository = {
|
||||||
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
||||||
DISABLE_HTTP_GIT = false;
|
DISABLE_HTTP_GIT = false;
|
||||||
@ -37,13 +38,36 @@ in {
|
|||||||
networking.firewall.allowedTCPPorts = [ 122 ];
|
networking.firewall.allowedTCPPorts = [ 122 ];
|
||||||
users.users.${config.user}.extraGroups = [ "gitea" ];
|
users.users.${config.user}.extraGroups = [ "gitea" ];
|
||||||
|
|
||||||
caddy.routes = [{
|
caddy.routes = [
|
||||||
match = [{ host = [ config.hostnames.git ]; }];
|
{
|
||||||
handle = [{
|
match = [{
|
||||||
handler = "reverse_proxy";
|
host = [ config.hostnames.git ];
|
||||||
upstreams = [{ dial = "localhost:3001"; }];
|
path = [ "/metrics*" ];
|
||||||
}];
|
}];
|
||||||
}];
|
handle = [{
|
||||||
|
handler = "static_response";
|
||||||
|
status_code = "403";
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
match = [{ host = [ config.hostnames.git ]; }];
|
||||||
|
handle = [{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [{
|
||||||
|
dial = "localhost:${
|
||||||
|
builtins.toString
|
||||||
|
config.services.gitea.settings.server.HTTP_PORT
|
||||||
|
}";
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
prometheus.scrapeTargets = [
|
||||||
|
"127.0.0.1:${
|
||||||
|
builtins.toString config.services.gitea.settings.server.HTTP_PORT
|
||||||
|
}"
|
||||||
|
];
|
||||||
|
|
||||||
## Backup config
|
## Backup config
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user