From 07f1ad0a6edda1895b2e7dc5f3f76ed08a2205ec Mon Sep 17 00:00:00 2001 From: john Date: Wed, 15 Jul 2026 11:58:01 +0800 Subject: [PATCH] fix: wait for imgproxy compat health on release --- scripts/imgproxy-runtime-package.test.mjs | 1 + scripts/install-imgproxy-runtime-prod.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/scripts/imgproxy-runtime-package.test.mjs b/scripts/imgproxy-runtime-package.test.mjs index 63a84fa..ba51e64 100644 --- a/scripts/imgproxy-runtime-package.test.mjs +++ b/scripts/imgproxy-runtime-package.test.mjs @@ -24,6 +24,7 @@ test('installer uses a read-only storage mount and both required ports', () => { assert.match(installer, /10\.10\.0\.2/); assert.match(installer, /IMGPROXY_UPSTREAM/); assert.match(installer, /DOCKER_BIN/); + assert.match(installer, /seq 1 20/); }); test('release verifies checksums before loading the image and backs up launch state', () => { diff --git a/scripts/install-imgproxy-runtime-prod.sh b/scripts/install-imgproxy-runtime-prod.sh index 1de0d24..7a1a7b6 100644 --- a/scripts/install-imgproxy-runtime-prod.sh +++ b/scripts/install-imgproxy-runtime-prod.sh @@ -54,4 +54,8 @@ launchctl bootout "$GUI/cn.tkmind.imgproxy-compat" 2>/dev/null || true launchctl bootstrap "$GUI" "$PLIST" launchctl enable "$GUI/cn.tkmind.imgproxy-compat" launchctl kickstart -k "$GUI/cn.tkmind.imgproxy-compat" +for _ in $(seq 1 20); do + curl -fsS --max-time 2 http://10.10.0.2:20081/health >/dev/null && break + sleep 1 +done curl -fsS --max-time 3 http://10.10.0.2:20081/health >/dev/null