Add systemd runner timer
deploy config / Explore-Gitea-Actions (push) Successful in 55s Details

This commit is contained in:
Tom 2024-08-09 22:12:25 +02:00
parent ec3f31e376
commit 4ed814c81e
1 changed files with 20 additions and 0 deletions

View File

@ -149,6 +149,26 @@
}; };
}; };
systemd = {
timers."start-runner" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "daily";
Persistent = true;
Unit = "start-runner.service";
};
};
services."start-runner" = {
script = ''
/root/runner/act_runner daemon &
'';
serviceConfig = {
Type = "oneshot";
User = "root";
};
};
};
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 3000 ]; networking.firewall.allowedTCPPorts = [ 22 3000 ];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];