mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
periodically update docker container (Jinja-Compose)
This commit is contained in:
parent
a76f5d20ec
commit
cc8d41cd68
@ -121,12 +121,29 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
# Start Jinja-Compose project during boot.
|
||||
# To few the log, run
|
||||
# Update and start Jinja-Compose project
|
||||
# during boot and after every 30 minutes.
|
||||
# To view the log, run
|
||||
# journalctl -b -u Jinja-Compose -f
|
||||
#
|
||||
systemd.timers."Jinja-Compose" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "Jinja-Compose.service" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "0m";
|
||||
OnUnitInactiveSec = "30m";
|
||||
|
||||
AccuracySec = "1m";
|
||||
RandomizedDelaySec = "1m";
|
||||
};
|
||||
};
|
||||
systemd.services."Jinja-Compose" = {
|
||||
description = "Start Jinja-Compose project";
|
||||
description = "Update and start Jinja-Compose project";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
PrivateTmp = true;
|
||||
User = "root";
|
||||
};
|
||||
path = with pkgs; [
|
||||
# The `docker-compose` helper script is written in `bash` (!)
|
||||
bash
|
||||
@ -137,7 +154,5 @@ in
|
||||
/jc-config/docker-compose pull
|
||||
/jc-config/docker-compose up -d --wait
|
||||
'';
|
||||
# Start after login.
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user