diff --git a/apps/api/tests/test_phase15_ops.py b/apps/api/tests/test_phase15_ops.py index e20d423..cad6388 100644 --- a/apps/api/tests/test_phase15_ops.py +++ b/apps/api/tests/test_phase15_ops.py @@ -46,6 +46,12 @@ class Phase15OpsTests(unittest.TestCase): finally: server.shutdown(); server.server_close(); thread.join(timeout=2) + def test_web_healthcheck_uses_image_runtime(self): + compose = (ROOT / "docker-compose.yml").read_text() + self.assertIn("python", compose) + self.assertIn("urllib.request.urlopen('http://127.0.0.1:8080/healthz'", compose) + self.assertNotIn('test: ["CMD", "wget", "--spider"', compose) + def test_backup_restore_integrity_and_checksum(self): with TemporaryDirectory() as tmp: root = Path(tmp); db = root / "prospects.db"; backups = root / "backups" diff --git a/docker-compose.yml b/docker-compose.yml index 10a650c..816c6b6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,7 +56,7 @@ services: cap_drop: - ALL healthcheck: - test: ["CMD", "wget", "--spider", "--quiet", "http://127.0.0.1:8080/healthz"] + test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/healthz', timeout=2)"] interval: 10s timeout: 3s retries: 5