summaryrefslogtreecommitdiff
path: root/deployment/doot-health.service
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/doot-health.service')
-rw-r--r--deployment/doot-health.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/deployment/doot-health.service b/deployment/doot-health.service
new file mode 100644
index 0000000..33e8e77
--- /dev/null
+++ b/deployment/doot-health.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=doot.terst.org health check (gateway routes + sub-services)
+Documentation=file:///site/doot.terst.org/app-scripts/health-check
+After=network-online.target
+
+[Service]
+Type=oneshot
+# Runs as root: recovery needs systemctl start and chmod on www-data files.
+User=root
+ExecStart=/site/doot.terst.org/app-scripts/health-check
+
+# A failed run should be visible in `systemctl --failed`, so do not swallow the
+# exit code. The unit going failed is a large part of the alerting here, given
+# there is no mail/ntfy on this host.
+SuccessExitStatus=0
+
+[Install]
+WantedBy=multi-user.target