ci: use network host mode for health check instead of container IP
CI Pipeline / HTML Lint (push) Successful in 14s
Deploy QA / Build and Push (push) Successful in 23s
CI Pipeline / Build Docker Image (push) Failing after 1m39s
CI Pipeline / Security Scan (push) Has been skipped
Deploy QA / Deploy to QA (push) Failing after 2s
CI Pipeline / Generate Summary (push) Failing after 1s
Deploy QA / Notification (push) Failing after 1s

This commit is contained in:
2026-06-01 20:33:58 -06:00
parent cb12d68fbe
commit 4cdafbc020
+2 -2
View File
@@ -70,6 +70,7 @@ jobs:
docker stop ci-test || true
docker rm ci-test || true
docker run -d --name ci-test \
--network host \
-e APP_ENV=ci \
-e APP_VERSION=ci-${{ gitea.sha }} \
-e BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
@@ -77,9 +78,8 @@ jobs:
-e GIT_BRANCH=${{ gitea.ref_name }} \
-e DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
ci-image:latest
CI_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ci-test)
for i in $(seq 1 12); do
if curl -sf http://$CI_IP/health > /dev/null 2>&1; then
if curl -sf http://localhost:80/health > /dev/null 2>&1; then
echo "::notice::Health check passed"
docker logs ci-test 2>&1 || true
docker stop ci-test