Fix CI DinD networking: host network mode + curl timeout
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 3s
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / test-go-pg (pull_request) Successful in 2m43s
CI/CD / test-sqlite (pull_request) Successful in 2m49s
CI/CD / test-runners (pull_request) Failing after 38s
CI/CD / build-and-deploy (pull_request) Has been skipped
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 3s
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / test-go-pg (pull_request) Successful in 2m43s
CI/CD / test-sqlite (pull_request) Successful in 2m49s
CI/CD / test-runners (pull_request) Failing after 38s
CI/CD / build-and-deploy (pull_request) Has been skipped
The previous fix (container IP resolution) still failed because the CI runner and compose containers are on separate Docker networks. - Add docker-compose.ci.yml override with network_mode: host so the container shares the runner's network stack directly - Add --connect-timeout 2 to curl in wait-for-healthy.sh so it fails fast instead of hanging indefinitely on unreachable hosts - Cap health check at 30s (server boots in 5-10s) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ MAX_RETRIES="${2:-60}"
|
||||
|
||||
echo "Waiting for ${HOST} to be healthy..."
|
||||
for i in $(seq 1 "$MAX_RETRIES"); do
|
||||
if curl -sf "${HOST}/api/v1/auth/login" -o /dev/null 2>/dev/null; then
|
||||
if curl -sf --connect-timeout 2 "${HOST}/api/v1/auth/login" -o /dev/null 2>/dev/null; then
|
||||
echo "Server healthy after ${i}s"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user