From f56d96753d29efca72a6870171c60490341cf531 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 11 Sep 2026 20:58:50 +0000 Subject: [PATCH] fix: print docker logs of mongodb container on startup timeout When the container fails to accept connections within 30s (e.g. mongod crashed right after start), the action only reported "not running" errors from the polling docker exec calls without showing why the container died. Dump the container's docker logs before exiting so failed CI runs surface the actual mongod error. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_019xjEKspAqewffzFkNCQsv8 --- entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index c8b34b1..ee53c6c 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -36,6 +36,9 @@ do if [[ $TIMER -eq 30 ]]; then echo "Did not initialize MongoDb within 30 seconds. Exit." + echo "---- docker logs mongodb ----" + docker logs mongodb + echo "------------------------------" exit 2 fi done