2.5 KiB
2.5 KiB
🔧 Deployment Issue Fixes
🔍 Issues Identified from Latest Log
Issue 1: TypeScript JSX Configuration Missing ❌→✅
Problem: TypeScript compilation failing with error TS6142: '--jsx' is not set
Root Cause: Generated tsconfig.json in Docker was missing JSX configuration
Fix Applied: Added "jsx":"react-jsx"
to the tsconfig.json generation in Dockerfile
Line Fixed: Line 77 in Dockerfile
Issue 2: Health Check Tool Mismatch ❌→✅
Problem: Health checks failing with wget: can't connect to remote host: Connection refused
Root Cause:
- Dockerfile uses
curl
for health checks - Coolify deployment system uses
wget
for health checks - Tool mismatch causing health check failures
Fix Applied:
- Added
wget
installation alongsidecurl
- Updated health check command to support both tools:
curl -f http://localhost/ || wget -q --spider http://localhost/ || exit 1
Issue 3: Container Health Check Endpoint ❌→✅
Problem: Health check trying to access /health
endpoint that doesn't exist
Fix Applied: Changed health check to use root path /
which always exists for Nginx
📋 Changes Made
1. Updated Dockerfile (Lines 77, 89, 113)
# Fixed TypeScript JSX configuration
RUN echo '{"compilerOptions":{..."jsx":"react-jsx"...}}' > tsconfig.json
# Added wget for Coolify compatibility
RUN apk add --no-cache curl wget
# Fixed health check with fallback
CMD curl -f http://localhost/ || wget -q --spider http://localhost/ || exit 1
✅ Expected Results
After these fixes:
- TypeScript Build: ✅ Should compile
.tsx
files successfully - Health Check: ✅ Should pass using either curl or wget
- Container Status: ✅ Should show as healthy
- Deployment: ✅ Should complete without rollback
🎯 Root Cause Analysis
The deployment failures were caused by:
- Build Configuration: Missing JSX support in generated TypeScript config
- Health Check Compatibility: Tool mismatch between Docker image and deployment platform
- Endpoint Mismatch: Health check looking for non-existent endpoint
🚀 Next Deployment
The next deployment should:
- ✅ Build successfully with JSX support
- ✅ Pass health checks with both curl and wget
- ✅ Complete without rollbacks
- ✅ Result in a fully functional application
Status: Ready for redeployment with fixes applied! 🎉