🔧 Improve health check logic in Gitea workflows
Some checks failed
CI/CD Pipeline (Fast) / production (push) Successful in 7m47s
CI/CD Pipeline (Reliable & Simple) / production (push) Failing after 8m46s
CI/CD Pipeline (Simple & Reliable) / production (push) Failing after 6m17s

- Enhanced health check mechanisms in `ci-cd-fast.yml` and `ci-cd-zero-downtime-fixed.yml` to utilize `docker exec` for internal checks, addressing issues with direct port access.
- Updated health check logic to provide better error messages and fallback methods, ensuring more reliable deployment verification.
- Documented changes in `DEPLOYMENT-FIXES.md` to reflect improvements in health check processes.

 These updates enhance the reliability of health checks during deployments and improve debugging capabilities.
This commit is contained in:
2025-09-15 14:15:49 +02:00
parent fc3f9ebf12
commit ed95163f55
3 changed files with 69 additions and 20 deletions

View File

@@ -54,6 +54,18 @@ The Gitea Actions were failing with "Connection refused" errors when trying to c
- **Files**:
- `docker-compose.zero-downtime-fixed.yml` (new)
#### **6. ✅ Fixed Health Check Logic**
- **Issue**: Health checks timing out even though applications were running correctly
- **Root Cause**: Workflows trying to access `localhost:3000` directly, but containers don't expose port 3000 to host
- **Fix**: Updated health check logic to:
- Use `docker exec` for internal container health checks
- Check nginx proxy endpoints (`localhost/api/health`) for zero-downtime deployments
- Provide fallback health check methods
- Better error messages and debugging information
- **Files**:
- `.gitea/workflows/ci-cd-zero-downtime-fixed.yml` (updated)
- `.gitea/workflows/ci-cd-fast.yml` (updated)
## Available Workflows
### 1. CI/CD Reliable (Recommended)