feat(health): add external URL column, backfill domains, thread through repo

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-08 00:54:10 +10:00
parent 276889e7fe
commit 789dc2442e
3 changed files with 34 additions and 9 deletions

View File

@@ -0,0 +1,17 @@
-- 022_monitored_services_external.sql
-- Optional external/domain URL for a service, used by the dashboard tile when the
-- owner is browsing remotely. LAN `url` stays the source of truth for health checks.
ALTER TABLE monitored_services ADD COLUMN external text;
-- Backfill curated domains by id (the live instance is already seeded, so adding the
-- column alone wouldn't populate them). No-op for ids that don't exist.
UPDATE monitored_services SET external = 'https://void.hynesy.com' WHERE id = 'void-server';
UPDATE monitored_services SET external = 'https://gramps.hynesy.com' WHERE id = 'gramps';
UPDATE monitored_services SET external = 'https://plex.hynesy.com' WHERE id = 'plex';
UPDATE monitored_services SET external = 'https://tdarr.hynesy.com' WHERE id = 'tdarr';
UPDATE monitored_services SET external = 'https://sonarr.hynesy.com' WHERE id = 'sonarr';
UPDATE monitored_services SET external = 'https://radarr.hynesy.com' WHERE id = 'radarr';
UPDATE monitored_services SET external = 'https://bookstack.hynesy.com' WHERE id = 'bookstack';
-- Two services previously stored their domain in `url`; normalise to LAN url + external.
UPDATE monitored_services SET url = 'http://192.168.1.230:8096', external = 'https://jellyfin.hynesy.com' WHERE id = 'jellyfin';
UPDATE monitored_services SET url = 'http://192.168.1.230:8789', external = 'https://chaptarr.hynesy.com' WHERE id = 'chaptarr';