Archived
modularized traefik log rotatation config
This commit is contained in:
@@ -25,6 +25,7 @@ in
|
||||
../../modules/docker/enable-service.nix
|
||||
# ../../modules/nix/tailscale-service.nix
|
||||
../../modules/tailscale/enable-service.nix
|
||||
../../modules/rotate-traefik-logs.nix
|
||||
];
|
||||
|
||||
|
||||
@@ -39,22 +40,22 @@ boot.zfs.forceImportRoot = false;
|
||||
nfs-utils
|
||||
];
|
||||
|
||||
services.logrotate = {
|
||||
enable = true;
|
||||
# services.logrotate = {
|
||||
# enable = true;
|
||||
|
||||
settings = {
|
||||
"/mnt/docker-volumes/traefik-data/logs/*.log" = {
|
||||
daily = true;
|
||||
size = "100M";
|
||||
rotate = 20;
|
||||
compress = true;
|
||||
missingok = true;
|
||||
notifempty = true;
|
||||
copytruncate = true;
|
||||
};
|
||||
# settings = {
|
||||
# "/mnt/docker-volumes/traefik-data/logs/*.log" = {
|
||||
# daily = true;
|
||||
# size = "100M";
|
||||
# rotate = 20;
|
||||
# compress = true;
|
||||
# missingok = true;
|
||||
# notifempty = true;
|
||||
# copytruncate = true;
|
||||
# };
|
||||
|
||||
};
|
||||
};
|
||||
# };
|
||||
# };
|
||||
|
||||
|
||||
boot.supportedFilesystems = [ "nfs" ];
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
services.logrotate = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
"/mnt/docker-volumes/traefik-data/logs/*.log" = {
|
||||
daily = true;
|
||||
size = "100M";
|
||||
rotate = 20;
|
||||
compress = true;
|
||||
missingok = true;
|
||||
notifempty = true;
|
||||
copytruncate = true;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user