Pre-Deployment Checklist
Use this comprehensive checklist to verify your production deployment.Django Configuration
Secure SECRET_KEY
Generate a unique, random SECRET_KEY:Requirements:
- Minimum 50 characters (config/checks.py:17)
- Unique per environment
- Never use default value
- Never commit to version control
.env
ALLOWED_HOSTS Configured
Set specific domain names (no wildcards):Do NOT use:Validated by config/checks.py:300.
.env
SSL/TLS Security
SSL Certificate Installed
Verify SSL certificate is active:Should show valid certificate from Let’s Encrypt or your CA.
Database Security
Strong Database Password
Use a strong password for PostgreSQL:Requirements:
- Minimum 16 characters
- Mix of letters, numbers, symbols
- Unique per environment
.env
Redis Configuration
Storage Configuration
Email Configuration
Sender Domain Verified
Verify domain in SendGrid:
- SendGrid > Settings > Sender Authentication
- Verify domain is authenticated
- DNS records are configured
Error Tracking
Security Headers
Content Security Policy
Configure CSP to allow required sources:Test for CSP violations in browser console.
.env
Verify Security Headers
Check all security headers are present:Should include:
Strict-Transport-SecurityX-Frame-Options: DENYX-Content-Type-Options: nosniffReferrer-Policy: strict-origin-when-cross-originContent-Security-Policy
Test with Security Headers Analyzer
Firewall and Network
Service Health
Django Deployment Checks
Run Django Checks
Run comprehensive deployment checks:This validates (config/checks.py):
- ✓ DEBUG disabled (checks.py:20)
- ✓ SECRET_KEY secure (checks.py:40)
- ✓ Required environment variables (checks.py:83)
- ✓ Database connectivity (checks.py:127)
- ✓ Redis connectivity (checks.py:151)
- ✓ Storage credentials (checks.py:268)
- ✓ ALLOWED_HOSTS configured (checks.py:300)
- ✓ SSL/HTTPS settings (checks.py:334)
Production Deployment Checklist
Print and complete this checklist:Django Configuration
-
DEBUG=Falseset - Unique
SECRET_KEYgenerated (50+ characters) -
ALLOWED_HOSTSconfigured (no wildcards) - Admin URL changed from default
-
python manage.py check --deploypasses
Security
- SSL certificate installed and valid
- HTTPS redirect enabled (
SECURE_SSL_REDIRECT=True) - HSTS configured
- Secure cookies configured
- Content Security Policy enabled
- Security headers verified
- Firewall configured (UFW or cloud firewall)
- Fail2ban enabled (bare metal)
- SSH hardened (no root, key-based auth)
Database
- Strong database password set
- Database connectivity verified
- Database backups configured
- Backup restoration tested
Redis
- Redis connectivity verified
- Redis password set (recommended)
Storage
- Storage backend configured (S3/R2)
- Storage credentials validated
-
collectstaticruns successfully - Static files accessible via CDN/bucket URL
- CORS configured (R2 only)
- SendGrid API key configured
- Sender domain verified in SendGrid
- Test email sent successfully
Monitoring
- Sentry DSN configured
- Sentry integration tested
- Error alerts configured in Sentry
Services
- All services running and enabled
- Health endpoints responding
- Admin panel accessible
- Logs are being written
- Log rotation configured
Performance
- Gunicorn workers configured appropriately
- Redis caching enabled
- Compression enabled
- Static files served from CDN
Documentation
- Environment variables documented
- Deployment process documented
- Recovery procedures documented
- Team has access to credentials (securely)
Post-Deployment Monitoring
After deployment, monitor for:First 24 Hours
Check Error Rates
Check Error Rates
Monitor Sentry for errors:
- Check error frequency
- Review stack traces
- Verify no critical errors
Monitor Performance
Monitor Performance
Review Logs
Review Logs
Verify Backups
Verify Backups
Ensure backups are running:
First Week
- Monitor disk space usage
- Review user registration and activity
- Check email delivery success rate
- Verify SSL certificate auto-renewal is configured
- Review Sentry performance metrics
- Test database restore procedure
Ongoing
- Weekly log reviews
- Monthly security updates
- Quarterly credential rotation
- Regular backup restoration tests
- Performance monitoring and optimization
Troubleshooting Checklist Failures
Django Checks Failing
Django Checks Failing
Health Endpoints Not Responding
Health Endpoints Not Responding
Static Files 404
Static Files 404
Database Connection Errors
Database Connection Errors
Final Verification
Before announcing your deployment:Complete User Journey
Test the complete user experience:
- Visit homepage via HTTPS
- Register new account
- Verify email received
- Log in
- Create an item
- Upload a photo
- View collection
- Test search/filter
- Log out
Security Scan
Run security scanners:
- SSL Labs - A or A+ grade
- SecurityHeaders.com - A or A+ grade
- Mozilla Observatory - A or A+ grade
Congratulations! If all checklist items are complete and verified, your FootyCollect deployment is production-ready.
Quick Reference Commands
Next Steps
After completing the checklist:Monitoring Setup
Configure ongoing monitoring with Sentry, log aggregation, and uptime monitoring
Backup Strategy
Implement automated backup rotation and test restoration procedures
Performance Tuning
Optimize Gunicorn workers, database queries, and caching strategies
Scaling
Plan for horizontal scaling with load balancers and multiple application servers