podman: Enable auto-updates
This commit is contained in:
parent
8332096355
commit
56f495cf9d
3 changed files with 31 additions and 12 deletions
|
@ -17,6 +17,8 @@
|
|||
];
|
||||
extraOptions = [
|
||||
"--network=ns:/var/run/netns/wg"
|
||||
"--label=com.centurylinklabs.watchtower.enable=true"
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -28,6 +30,8 @@
|
|||
];
|
||||
extraOptions = [
|
||||
"--network=ns:/var/run/netns/wg"
|
||||
"--label=com.centurylinklabs.watchtower.enable=true"
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
volumes = [
|
||||
"/etc/container-matrix/signald:/signald"
|
||||
];
|
||||
extraOptions = [
|
||||
"--label=com.centurylinklabs.watchtower.enable=true"
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
];
|
||||
};
|
||||
|
||||
# https://mau.dev/mautrix/signal
|
||||
|
@ -24,10 +20,6 @@
|
|||
"/etc/container-matrix/signal:/data"
|
||||
"/etc/container-matrix/signald:/signald"
|
||||
];
|
||||
extraOptions = [
|
||||
"--label=com.centurylinklabs.watchtower.enable=true"
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
];
|
||||
};
|
||||
|
||||
# https://mau.dev/mautrix/whatsapp
|
||||
|
@ -37,10 +29,6 @@
|
|||
volumes = [
|
||||
"/etc/container-matrix/whatsapp:/data"
|
||||
];
|
||||
extraOptions = [
|
||||
"--label=com.centurylinklabs.watchtower.enable=true"
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -28,4 +28,31 @@
|
|||
allowedUDPPorts = [ 53 ];
|
||||
allowedTCPPorts = [ 53 ];
|
||||
};
|
||||
|
||||
# It looks like there is no way to activate the "built-in" service and timer ...
|
||||
systemd.services.podman-auto-update-custom = {
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
|
||||
serviceConfig =
|
||||
let
|
||||
podman = config.virtualisation.podman.package;
|
||||
in
|
||||
{
|
||||
Type = "oneshot";
|
||||
ExecStart = "${podman}/bin/podman auto-update";
|
||||
ExecStartPost = "${podman}/bin/podman image prune -f";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.podman-auto-update-custom = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = 900;
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue