feat(tilo): enable cron job for Nextcloud docker container
This commit is contained in:
parent
683796549f
commit
912213803f
@ -14,6 +14,7 @@
|
||||
../../modules/ssh.nix
|
||||
../../modules/endlessh.nix
|
||||
../../programs/nano.nix
|
||||
./services
|
||||
];
|
||||
|
||||
system = {
|
||||
|
3
hosts/tilo/services/default.nix
Normal file
3
hosts/tilo/services/default.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
imports = [./nextcloud-cron.nix];
|
||||
}
|
22
hosts/tilo/services/nextcloud-cron.nix
Normal file
22
hosts/tilo/services/nextcloud-cron.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{pkgs, ...}: {
|
||||
systemd = {
|
||||
timers."nextcloud-cron" = {
|
||||
wantedBy = [""];
|
||||
timerConfig = {
|
||||
OnBootSec = "5m";
|
||||
OnUnitActiveSec = "5m";
|
||||
Unit = "nextcloud-cron.service";
|
||||
};
|
||||
};
|
||||
services."nextcloud-cron" = {
|
||||
script = ''
|
||||
set -eu
|
||||
${pkgs.docker}/bin/docker exec -u www-data -it nextcloud-nextcloud-1 php /var/www/html/cron.php
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user