Pre-Deployment Checklist
Before deploying to production, ensure you have:- Generated a secure
APP_KEY - Set
APP_DEBUG=false - Configured proper database backups
- Set up external Aria2 and Meilisearch services
- Reviewed security settings
- Configured HTTPS/TLS certificates
- Set up monitoring and logging
Environment Configuration
Required Settings
Update your.env file with production values:
Generate Application Key
TheAPP_KEY is critical for encryption. Generate it before first deployment:
Build Optimization
Frontend Build
The Dockerfile builds the frontend assets during image creation (docker/Dockerfile:3-13):Backend Optimization
The Docker build includes production optimizations (docker/Dockerfile:70):--optimize-autoloader- Generates optimized class maps--no-dev- Excludes development dependencies--no-cache- Reduces image size
PHP Configuration
Production PHP settings are configured in the Dockerfile (docker/Dockerfile:38-43):opcache- Bytecode caching for faster executionapcu- In-memory user data cacheredis- Fast session and cache storagezstd- Modern compression algorithm
Caching Strategy
Application Caching
The entrypoint script (docker/entrypoint.sh:38-41) automatically caches:Redis Configuration
For high-traffic deployments, use Redis instead of database caching:Queue Worker Optimization
The queue worker (docker/Dockerfile:105) runs with production settings:--memory=2048- Restart worker after 2GB memory usage--timeout=0- No timeout (downloads can be long-running)--tries=3- Retry failed jobs 3 times
Scaling Queue Workers
For high-volume downloads, scale the queue service:Security Hardening
Disable Debug Mode
Ensure debug mode is disabled (exposes sensitive information):Hide PHP Version
The Dockerfile already sets (docker/Dockerfile:38):Secure Session Configuration
Disable Telescope in Production
Telescope can expose sensitive data:HTTPS/TLS Configuration
Enable HTTPS Ports
Uncomment in docker-compose.yml:46-47:Configure Caddy for TLS
Updatedocker/Caddyfile for automatic HTTPS:
Database Backups
Since the application uses SQLite, implement regular backups:Automated Backup Script
Backup with Docker
Monitoring and Health Checks
Application Health Check
The Dockerfile includes a health check (docker/Dockerfile:111):Monitor Container Status
Laravel Pulse (Optional)
Enable Laravel Pulse for application monitoring:/pulse (configure authentication first).
Performance Benchmarks
Expected Performance
With FrankenPHP and Laravel Octane (docker/Dockerfile:112):- Concurrent requests: 100+ req/sec
- Response time: Less than 50ms for cached routes
- Memory usage: ~200-300MB per service
- Queue throughput: Depends on download speeds
Load Testing
Use Laravel’s built-in tools:Deployment Strategies
Zero-Downtime Updates
Rollback Procedure
Scaling Considerations
Horizontal Scaling
For multiple servers, consider:- Shared database: Migrate from SQLite to PostgreSQL/MySQL
- Shared storage: Use S3 or NFS for media files
- Load balancer: Distribute traffic across application instances
- Centralized queue: Use Redis queue driver instead of database
Vertical Scaling
Adjust resource limits in docker-compose.yml:Next Steps
- Review Docker Deployment for container details
- Check Troubleshooting for common issues
- Set up monitoring with Laravel Pulse or external tools
- Configure automated backups and disaster recovery