🚀 Deployment & Hosting
Deploy AI app của bạn lên production.
Deployment Options
Platform Comparison
Text
1┌─────────────┬───────────────┬───────────────┐2│ Platform │ Hosting │ Custom Domain │3├─────────────┼───────────────┼───────────────┤4│ Bubble │ Built-in │ Yes (paid) │5│ Glide │ Built-in │ Pro plan │6│ FlutterFlow │ Firebase/AWS │ Yes │7│ Softr │ Built-in │ Yes (paid) │8└─────────────┴───────────────┴───────────────┘Bubble Deployment
Development vs Production
Text
1Bubble has 2 versions:2 3Development (free subdomain):4- yourapp.bubbleapps.io/version-test5- For testing6- Not indexed7 8Production (live):9- yourapp.bubbleapps.io (or custom domain)10- Public access11- SEO indexedDeploy to Live
Text
1Steps:21. Go to Deployment tab32. Click "Deploy to Live"43. Review changes54. Confirm deployment65. App is now live!Version Control
Text
1Bubble versions:2- Save current as named version3- Roll back if issues4- Compare versions5- Restore previous statesCustom Domain Setup
Buy Domain
Text
1Domain providers:2- Namecheap3- GoDaddy4- Google Domains5- Cloudflare6 7Choose:8- .com for business9- .ai for AI products10- .app for applicationsDNS Configuration
Text
1In your DNS provider:2 3For root domain (yourdomain.com):4- Type: A5- Host: @6- Value: Bubble's IP7 8For www:9- Type: CNAME10- Host: www11- Value: yourapp.bubbleapps.ioBubble Custom Domain
Text
1In Bubble:21. Settings → Domain/Email32. Enter your domain43. Verify DNS settings54. Enable HTTPS65. Wait for propagation (up to 48h)SSL/HTTPS
Why HTTPS?
Text
1Required for:2- Security (encrypted traffic)3- User trust4- SEO ranking5- API calls6- Payment processingBubble SSL
Text
1Bubble includes free SSL:21. Custom domain configured32. SSL auto-enabled43. Redirects HTTP → HTTPSEnvironment Variables
API Keys Management
Never Expose API Keys
Text
1Development keys:2- Can be less secure3- Lower rate limits4 5Production keys:6- Secure and protected7- Higher rate limits8- Different billingBubble API Keys
Text
1Settings → API:2- Development key3- Live key (different!)4 5Switch automatically based on versionApp Settings per Environment
Text
1Use Option Sets or Settings:2 3Setting: openai_api_key4- Dev value: sk-dev-xxx5- Live value: sk-live-xxx6 7Reference: Get setting's valuePerformance Optimization
Page Load Speed
Text
1Optimize:21. Minimize workflows on load32. Lazy load images43. Optimize repeating groups54. Use pagination65. Compress assetsDatabase Queries
Text
1Best practices:21. Add constraints to searches32. Use indexes effectively43. Avoid unnecessary "Do a search"54. Cache frequent queriesAPI Call Optimization
Text
1For AI features:21. Implement caching32. Use appropriate model sizes43. Limit context length54. Batch requests when possibleSEO Setup
Basic SEO
Text
1Settings → SEO / metatags:2 3- App title4- Description5- Keywords6- OG image (for social sharing)7- FaviconPage-Level SEO
Text
1Each page:2- Unique title3- Meta description4- OG tags5- Structured data (if needed)Sitemap
Text
1Bubble auto-generates sitemap:2- yourapp.com/sitemap.xml3- Submit to Google Search ConsoleAnalytics
Google Analytics
Text
1Setup:21. Create GA4 property32. Get Measurement ID (G-xxx)43. Bubble Settings → SEO54. Add GA ID65. Or use plugin for more controlTracking Events
Text
1Track important actions:2- Sign ups3- Upgrades4- AI generations5- Feature usage6 7Use: Google Analytics plugin8Custom events in workflowsError Monitoring
Track Errors
Text
1Monitor production errors:2- Server logs in Bubble3- Third-party: Sentry, LogRocket4- Set up alertsError Alerts
Text
1Get notified when:2- API calls fail3- Payments fail4- High error rate5- Performance dropsSecurity Checklist
Security Before Launch
Text
1☐ Privacy rules configured2☐ API keys not exposed3☐ User data protected4☐ Payment integration tested5☐ Rate limiting enabled6☐ Input validation7☐ XSS prevention8☐ HTTPS enforcedPre-Launch Checklist
Before Going Live
Text
1Functionality:2☐ All features work3☐ Forms submit correctly4☐ Payments process5☐ Emails send6☐ AI features respond7 8Performance:9☐ Page loads < 3s10☐ Mobile responsive11☐ No console errors12☐ Images optimized13 14Content:15☐ Terms of Service16☐ Privacy Policy17☐ Contact information18☐ Help/FAQ page19 20Technical:21☐ Custom domain working22☐ SSL certificate active23☐ Analytics installed24☐ Error monitoring set up25☐ Backups configuredScaling Considerations
Bubble Plans
Text
1Choose plan based on:2- Number of users3- Workflow runs4- Database size5- Server capacity6 7Free: Learning/testing8Starter: Small apps9Growth: Production apps10Team/Professional: High-trafficWhen to Scale
Text
1Upgrade when:2- Slow page loads3- Workflow limits hit4- Database growing5- More capacity neededBackup Strategy
Database Backups
Text
1Bubble includes:2- Automatic backups3- Point-in-time recovery4- Manual backup option5 6Best practice:7- Regular exports8- External backup storage9- Test restorationMaintenance Mode
Enable Maintenance
Text
1When doing major updates:21. Enable maintenance mode32. Show "Under Maintenance" page43. Make changes54. Test65. Disable maintenance modeBài Tập
Deploy Your App
Complete deployment:
- Test all features thoroughly
- Configure custom domain
- Set up SSL
- Add analytics
- Create error monitoring
- Complete pre-launch checklist
- Deploy to live
- Verify everything works
Tiếp theo: Bài 14 - Monetization Strategies
