Deployment failed: Image size exceeds 8 GiB limit for Autoscale (Cloud Run)
Added exclusions for:
infrastructure/- Development-only filesagents/- Trinity Symphony agent scripts (not needed in production)attached_assets/- User uploads and test files.cursor/- IDE files
Your .replit file has 16 excessive port configurations causing bloat.
Action Required: Edit .replit and remove lines 18-77:
Before (lines 14-77):
[[ports]]
localPort = 5000
externalPort = 80
[[ports]]
localPort = 24678
externalPort = 6000
# ... (14 more port configs) ...After (keep ONLY this):
[[ports]]
localPort = 5000
externalPort = 80How to fix:
- Open
.replitfile - Delete lines 18-77 (all the extra port configs)
- Keep only the first port configuration (5000 → 80)
If you need all the current features and can't reduce image size below 8 GiB:
- Go to Deployments pane in Replit
- Click Configuration tab
- Change deployment type from Autoscale to Reserved VM
- Reserved VM supports larger images (no 8 GiB limit)
Trade-offs:
- ✅ Supports larger applications
- ✅ More consistent performance
- ❌ Slightly higher cost
- ❌ No auto-scaling
Your project has many packages. Consider removing unused ones:
Large packages that might not be needed:
torch(Python) - Machine learning library (very large)- Multiple blockchain SDKs if not all are used
- Duplicate AI provider packages
Check what's installed:
npm list --depth=0 | grep -v deduped | wc -lRemove unused packages:
npm uninstall package-name- ✅ Enhanced .dockerignore (DONE)
- Clean up .replit (remove 15 extra ports)
- Try deployment again
- If still too large, remove unused npm packages
- Go to Deployments → Configuration
- Switch from Autoscale to Reserved VM
- Deploy without size limits
The updated .dockerignore now excludes:
Development Files:
infrastructure/- Patent docs, HDM manifestsagents/- Trinity Symphony scripts (HDM, APM, MEL)attached_assets/- User uploads.cursor/- IDE files- All
.mdfiles except README.md - Test files (
*.test.ts,*.spec.js)
Build Artifacts:
node_modules/- Rebuilt during deploymentdist/,build/,.next/- Cache directories
- Log files
Total Estimated Savings: ~2-4 GiB from excluded directories
Your deployment runs:
npm run build # Builds production assets
npm run start # Starts production serverMake sure these scripts in package.json only include production deps.
Simulate deployment size:
# Check what WILL be deployed
tar --exclude-from=.dockerignore -czf deployment-test.tar.gz .
du -sh deployment-test.tar.gz
rm deployment-test.tar.gzIf output is < 2 GiB compressed, deployment should succeed.
If deployment still fails after fixes:
- Check Deployment logs for specific errors
- Run:
du -sh infrastructure/ agents/ attached_assets/to verify exclusions - Consider switching to Reserved VM deployment type
Contact Replit Support if issues persist:
- Deployments pane → Help → Contact Support
- Mention: "Image size exceeds 8 GiB on Autoscale deployment"