52 - Fix frontend healthcheck to probe 127.0.0.1 (localhost resolves to IPv6)

This commit is contained in:
myrmidex 2026-06-28 18:44:59 +02:00
parent b518dbeb1f
commit 5ed9fc8fb7

View file

@ -56,9 +56,12 @@ services:
CHOKIDAR_USEPOLLING: "true"
# Marks the service healthy only once Vite is actually serving — the e2e
# runner waits on this (condition: service_healthy) to avoid racing startup.
# start_period covers the slow first boot (global npm install + npm install).
# Use 127.0.0.1, NOT localhost: the container resolves localhost to ::1
# (IPv6) first, but Vite binds 0.0.0.0 (IPv4 only) → an IPv6 probe is
# refused and the container never goes healthy. start_period covers the
# first boot (npm install of the app deps).
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:5173/"]
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:5173/"]
interval: 5s
timeout: 3s
retries: 5