From e7a231cafd67678eacc0a69fadad096fd623df09 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 19 May 2026 13:58:06 +0200 Subject: [PATCH] deploy/mainnet/chatmock: healthcheck via urllib (wget absent in image) The storagetime/chatmock image has neither wget nor curl, so the previous wget-based healthcheck always failed with "executable file not found" and the container sat in "starting" forever. The image does carry a Python interpreter (chatmock is a Flask app), so swap to a 1-liner urllib probe of /health. /health returns 200 even before OAuth login, so a red healthcheck now means the Flask server itself is down. Co-Authored-By: Claude Opus 4.7 (1M context) --- deploy/mainnet/docker-compose.chatmock.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/mainnet/docker-compose.chatmock.yml b/deploy/mainnet/docker-compose.chatmock.yml index b1614c8..bf80ef3 100644 --- a/deploy/mainnet/docker-compose.chatmock.yml +++ b/deploy/mainnet/docker-compose.chatmock.yml @@ -53,7 +53,10 @@ services: volumes: - chatmock_data:/data healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost:8000/health >/dev/null || exit 1"] + # chatmock image has neither curl nor wget — use the bundled Python's + # urllib to probe /health. /health returns 200 even before OAuth login + # so an unhealthy state here means the Flask server itself is down. + test: ["CMD-SHELL", "python3 -c 'import urllib.request,sys; sys.exit(0 if urllib.request.urlopen(\"http://localhost:8000/health\", timeout=3).status==200 else 1)' || exit 1"] interval: 20s timeout: 5s retries: 3