From 1873f50f7f85d1f8d60c9ffbc19b464650028581 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 11 May 2026 14:08:23 +0200 Subject: [PATCH] infra(mailpit): use nc -z healthcheck instead of wget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mailpit service healthcheck previously assumed `wget` ships in the axllent/mailpit image. That's true for v1.29.7 but is not part of the image's contract — a future Alpine slim-down could drop wget and silently disable the healthcheck. Switched to BusyBox `nc -z localhost 8025`, which is a TCP-port open check with no dependency beyond BusyBox itself. Verified inside axllent/mailpit:v1.29.7 that `nc` is present (/usr/bin/nc, BusyBox v1.37.0) and that the proposed command returns 0 against an open port and non-zero against a closed one. Compose still parses with `--profile staging`. Addresses @tobi's round-2 suggestion on PR #499. Co-Authored-By: Claude Opus 4.7 --- docker-compose.prod.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index b821ec33..4cd7d9c4 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -103,7 +103,11 @@ services: networks: - archive-net healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost:8025/api/v1/info >/dev/null 2>&1 || exit 1"] + # TCP-port open check via BusyBox `nc`. The previous wget-based probe + # introduced a non-obvious binary dependency on the mailpit image; a + # future tag that ships without wget would silently disable the + # healthcheck. `nc` is part of BusyBox in the upstream image. + test: ["CMD-SHELL", "nc -z localhost 8025 || exit 1"] interval: 10s timeout: 5s retries: 5