fix:changed hleath check logic
Build & Deploy (develop) / build-and-deploy (push) Successful in 10s

This commit is contained in:
2026-09-07 08:27:12 +03:30
parent 4b4e31a55f
commit 9ba09fb55b
+6 -2
View File
@@ -51,12 +51,16 @@ jobs:
- name: Health check (retries for ~30s) - name: Health check (retries for ~30s)
run: | run: |
for i in $(seq 1 15); do for i in $(seq 1 15); do
if docker exec robot-market wget -qO- --timeout=5 http://localhost:3000 > /dev/null 2>&1; then if docker exec robot-market node -e "
require('http').get('http://localhost:3000', res => {
process.exit(res.statusCode < 400 ? 0 : 1);
}).on('error', () => process.exit(1));
" 2>/dev/null; then
echo "Container is healthy" echo "Container is healthy"
exit 0 exit 0
fi fi
echo "Not ready yet, retrying..." echo "Not ready yet, retrying..."
sleep 5 sleep 2
done done
echo "Health check failed after 30s" echo "Health check failed after 30s"
exit 1 exit 1