🔧 Improve health check logic in Gitea workflows
- 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user