-
Notifications
You must be signed in to change notification settings - Fork 0
Debugging
Griffen Fargo edited this page Apr 21, 2026
·
2 revisions
Troubleshooting and debugging procedures for strut VPS deployments.
strut my-stack health --env prod # Health check all services
strut my-stack status --env prod # Container status
strut my-stack logs my-service --tail 100 --env prod # Recent logs
strut status-all --env prod # Dashboard across every stack
strut status-all --env prod --json # Same, JSON for scripts
strut doctor # Environment-level checks (Docker, SSH keys, tools)
strut doctor --check-vps # + SSH reachability for each env filestatus-all (since v0.11.0) is the fastest way to see which stacks are running — it reads container state, newest rollback snapshot, newest backup, and cached drift metrics without running full health probes. Exit 1 if any stack is down or degraded.
nginx can't reach the backend — usually after a container restart assigns new Docker IPs.
strut my-stack exec "docker compose exec nginx nginx -s reload" --env prodstrut my-stack stop --env prod # Stop everything cleanly
strut my-stack deploy --env prod # Redeploystrut my-stack logs my-service --tail 100 --env prod
strut my-stack exec "docker compose exec my-service env" --env prodCommon causes: missing env vars, DB connection issues, port conflicts, disk full.
strut my-stack exec "docker compose exec postgres pg_isready -U postgres" --env prod
strut my-stack exec "docker compose exec redis redis-cli ping" --env prodstrut my-stack exec "df -h /" --env prod
strut my-stack exec "docker system df" --env prod
strut my-stack exec "docker image prune -f" --env prod# Execute command in container
strut my-stack debug exec my-service "ls -la /app"
# Open interactive shell
strut my-stack debug shell my-service
# Forward port from container
strut my-stack debug port-forward my-service 3000:3000
# Copy files to/from container
strut my-stack debug copy my-service /app/logs ./local-logs
# Create container snapshot
strut my-stack debug snapshot my-service
# Show environment variables
strut my-stack debug inspect-env my-service
# Show real-time resource usage
strut my-stack debug stats my-servicestrut my-stack shell --env prod # Interactive SSH
strut my-stack exec "docker stats --no-stream" --env prod # Resource usage
strut my-stack exec "docker inspect <container>" --env prod # Full inspection| Tool | Use For |
|---|---|
exec |
Single commands, automation, quick checks |
shell |
Interactive debugging, multiple commands |
strut my-stack local debug shell my-service # Local containers
strut my-stack prod debug shell my-service # Production containers
strut my-stack staging debug shell my-service # Staging containersstrut · v0.1.0 · Report an Issue
Getting Started
Core Concepts
Operations
- Deployment
- Blue-Green Deploy
- Deploy Rollback
- Database Backups
- Stack Groups
- Lifecycle Hooks
- Notifications
- Key Rotation
- Drift Detection
- Domain and SSL
- Monitoring
- Volume Management
Advanced
- Security Posture
- VPS Audit and Migration
- Stack Validation
- Data Anonymization
- Debugging
- Local Development
Extending
Contributing