1
0
Fork 0

podman: Enable auto-updates

This commit is contained in:
Daniel Kempkens 2023-05-21 17:07:55 +02:00
parent 8332096355
commit 56f495cf9d
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
3 changed files with 31 additions and 12 deletions

View file

@ -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"
];
};

View file

@ -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"
];
};
};

View file

@ -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;
};
};
}