feat: automate production maintenance

This commit is contained in:
ik
2026-09-07 07:44:11 +07:00
parent 6e60988ac9
commit 2fa6b68279
9 changed files with 84 additions and 3 deletions
@@ -0,0 +1,13 @@
[Unit]
Description=RF4 Spotter backup and retention maintenance
After=docker.service network-online.target
Requires=docker.service
[Service]
Type=oneshot
User=rf4spotter
WorkingDirectory=/opt/rf4-spotter
ExecStart=/opt/rf4-spotter/deploy/maintenance.sh
# Backups can take longer on a growing database and object store.
TimeoutStartSec=2h
@@ -0,0 +1,10 @@
[Unit]
Description=Run RF4 Spotter backup and retention daily
[Timer]
OnCalendar=*-*-* 03:10:00
RandomizedDelaySec=10min
Persistent=true
[Install]
WantedBy=timers.target