mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-25 22:35:03 +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.
|
# Update and start Jinja-Compose project
|
||||||
# To few the log, run
|
# during boot and after every 30 minutes.
|
||||||
|
# To view the log, run
|
||||||
# journalctl -b -u Jinja-Compose -f
|
# 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" = {
|
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; [
|
path = with pkgs; [
|
||||||
# The `docker-compose` helper script is written in `bash` (!)
|
# The `docker-compose` helper script is written in `bash` (!)
|
||||||
bash
|
bash
|
||||||
@ -137,7 +154,5 @@ in
|
|||||||
/jc-config/docker-compose pull
|
/jc-config/docker-compose pull
|
||||||
/jc-config/docker-compose up -d --wait
|
/jc-config/docker-compose up -d --wait
|
||||||
'';
|
'';
|
||||||
# Start after login.
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user