Neither service in docker-compose.yml declares a healthcheck, so docker compose ps reports a container as up even when the engine has stopped serving. The backend already exposes a perfectly good probe at GET /api/status.
What to do
- Backend: healthcheck against
http://localhost:8000/api/status
- Dashboard: healthcheck against
http://localhost:3000
- Sensible
interval, timeout, retries and start_period — the engine takes a while to build the universe on boot, so start_period matters
- Change
depends_on for the dashboard to condition: service_healthy
Acceptance
Notes
The base images are slim/alpine — check curl or wget actually exists before depending on it, and install it in the Dockerfile if not.
Neither service in
docker-compose.ymldeclares ahealthcheck, sodocker compose psreports a container as up even when the engine has stopped serving. The backend already exposes a perfectly good probe atGET /api/status.What to do
http://localhost:8000/api/statushttp://localhost:3000interval,timeout,retriesandstart_period— the engine takes a while to build the universe on boot, sostart_periodmattersdepends_onfor the dashboard tocondition: service_healthyAcceptance
docker compose psshows real health, not just "up"docker compose config --quietpassesdocker compose upreaches healthy without a false failure during universe buildNotes
The base images are slim/alpine — check
curlorwgetactually exists before depending on it, and install it in the Dockerfile if not.