fix: force container recreate with down+up, use wget for health check
Some checks failed
Deploy / deploy (push) Failing after 3m52s

- docker compose down + up forces container recreation with new labels
- Replace curl (not in runner) with wget for internal health check
- Health check against 127.0.0.1:3200 (internal, no domain needed)
This commit is contained in:
Gianpierre Mio
2026-03-10 08:50:35 -05:00
parent e3a89e82a2
commit 6c0201637f

View File

@@ -35,9 +35,16 @@ jobs:
- name: Deploy containers
run: |
cd /home/deployer/api-ubigeo
docker compose -f docker-compose.production.yml up -d --remove-orphans
docker compose -f docker-compose.production.yml down --remove-orphans
docker compose -f docker-compose.production.yml up -d
- name: Health check
run: |
sleep 10
curl -f https://api-ubigeo.darkcodex.dev/api/v1/health
sleep 15
STATUS=$(wget -qO- http://127.0.0.1:3200/api/v1/health || echo "fail")
echo "Internal health: $STATUS"
if echo "$STATUS" | grep -q "ok"; then
echo "API is up"
else
echo "API health check failed" && exit 1
fi