Production Deployment Runbook
Quick reference guide for deploying Dashtray to production.Quick Links
Prerequisites
- All tests passing
- Staging environment verified
- Environment variables configured
- Team notified of deployment window
Deployment Steps
1. Pre-Deployment Check
2. Deploy Convex Backend
3. Deploy Frontend
4. Verify Deployment
5. Smoke Tests
6. Monitor
Rollback Procedure
Rollback Convex
Rollback Cloudflare Pages
- Go to Cloudflare Pages dashboard
- Navigate to Deployments
- Find last working deployment
- Click “Rollback to this deployment”
Rollback Git
Emergency Contacts
- On-Call Engineer: [phone/slack]
- Convex Support: support@convex.dev
- Cloudflare Support: https://dash.cloudflare.com/support
- DodoPayments Support: support@dodopayments.com
Common Issues
Issue: Build Failure
Symptoms: GitHub Actions build fails Solution:- Check build logs in GitHub Actions
- Verify environment variables are set
- Test build locally:
pnpm run build - Check Node.js version (should be 20)
Issue: Convex Functions Not Deploying
Symptoms: Functions not updating in production Solution:- Check
convex.jsonconfiguration - Verify Convex CLI is authenticated:
npx convex dev - Check for syntax errors in Convex functions
- Try manual deployment:
npx convex deploy --prod
Issue: Environment Variables Not Loading
Symptoms: Application errors related to missing config Solution:- Verify variables in Convex:
npx convex env list --prod - Check Cloudflare Pages environment variables
- Verify GitHub secrets and variables
- Rebuild application after updating variables
Issue: Webhooks Not Received
Symptoms: DodoPayments events not processing Solution:- Check webhook URL in DodoPayments dashboard
- Verify webhook signature validation
- Check Convex logs:
npx convex logs --prod | grep webhook - Test webhook manually using DodoPayments test mode
Issue: SSL Certificate Errors
Symptoms: HTTPS not working or certificate warnings Solution:- Verify DNS records are correct
- Wait for DNS propagation (up to 24 hours)
- Check Cloudflare SSL/TLS settings (should be “Full (strict)”)
- Verify custom domain is added in Cloudflare Pages
Issue: High Response Times
Symptoms: Application is slow Solution:- Check Cloudflare Analytics for traffic spikes
- Review Convex function performance
- Check for database query issues
- Verify CDN caching is working
- Consider scaling Convex plan if needed
Monitoring Checklist
After deployment, verify:- Uptime monitoring is active
- Error tracking is receiving events
- Performance monitoring shows normal metrics
- Webhook delivery is working
- Email delivery is working
- Integration syncs are running
- Cron jobs are executing
- Rate limiting is active
- API endpoints are responding
Post-Deployment Tasks
Within 24 hours:- Monitor error logs
- Check user feedback
- Verify all integrations working
- Review performance metrics
- Update team on deployment status
- Document any issues encountered
- Plan next release
Deployment Schedule
Recommended deployment windows:- Best: Tuesday-Thursday, 10 AM - 2 PM (local time)
- Avoid: Fridays, weekends, holidays, late nights
- Maintenance Window: Announce 24 hours in advance
Version Tracking
Document each deployment:Success Criteria
Deployment is successful when:- All smoke tests pass
- Error rate < 1%
- Response time < 2s (p95)
- No critical bugs reported
- All integrations working
- Webhooks processing correctly
- Monitoring shows normal metrics