Platform Overview
Laravel Forge
Best for: Most usersAutomated server management and deployment with one-click setup for Laravel applications.
- Zero-downtime deployments
- Automatic SSL certificates
- Queue worker management
- Scheduler configuration
Laravel Vapor
Best for: Serverless & scalabilityServerless deployment platform on AWS Lambda with auto-scaling.
- Auto-scaling
- Pay-per-use pricing
- Global CDN
- Managed databases
DigitalOcean
Best for: Balance of ease and controlCloud hosting with App Platform for easy deployment or Droplets for full control.
- Simple setup
- Predictable pricing
- Managed databases
- 1-click apps
Traditional VPS
Best for: Full control & customizationSelf-managed server on providers like Linode, Vultr, or Hetzner.
- Complete control
- Lower costs
- Custom configurations
- Learning experience
Laravel Forge (Recommended)
Laravel Forge is the easiest way to deploy NutriFit. It handles server provisioning, deployment, SSL, queue workers, and more.
Prerequisites
- Laravel Forge account (forge.laravel.com)
- Cloud server provider account (DigitalOcean, Linode, Vultr, AWS, etc.)
- Domain name with DNS management access
- Git repository (GitHub, GitLab, or Bitbucket)
Deployment Steps
Create Server in Forge
- Log into Laravel Forge
- Click Create Server
- Select your cloud provider
- Choose server configuration:
- Server Type: App Server
- Size: At least 1GB RAM (2GB recommended)
- PHP Version: 8.2
- Database: MySQL 8.0
- Name your server and click Create Server
Server provisioning takes 5-10 minutes.
Configure Domain
- In Forge, go to your server
- Click Sites → New Site
- Enter your domain:
yourdomain.com - Project Type: Laravel
- Web Directory:
/public
Connect Git Repository
- Go to your site in Forge
- Click Apps → Git Repository
- Select provider (GitHub/GitLab/Bitbucket)
- Enter repository:
username/nutrifit - Branch:
mainorproduction - Click Install Repository
Setup SSL Certificate
- Go to SSL
- Click LetsEncrypt
- Enter domains:
yourdomain.com,www.yourdomain.com - Click Obtain Certificate
SSL certificate is automatically renewed by Forge.
Configure Queue Worker
- Go to Queue → Add Worker
- Connection:
database(orredis) - Queue:
default - Max Tries:
3 - Click Add Worker
Enable Scheduler
- Go to Scheduler
- Verify it’s enabled (should be by default)
- This runs Laravel’s scheduler every minute
Deploy Application
- Go to Apps → Git Repository
- Click Deploy Now
Deploy Script
Customize Forge’s deploy script (optional):Laravel Vapor
Serverless deployment on AWS Lambda.Prerequisites
- Laravel Vapor account (vapor.laravel.com)
- AWS account
- Vapor CLI installed
Setup
Vapor Considerations
DigitalOcean
Option 1: App Platform (Easiest)
Create App
- Log into DigitalOcean
- Go to Apps → Create App
- Connect your Git repository
- Select branch:
main
Add Database
- Click Add Resource → Database
- Choose MySQL
- Select plan (Basic recommended)
- Database is automatically connected
Option 2: Droplet (More Control)
Create Droplet
- Create Droplet with Ubuntu 22.04
- Size: At least 1GB RAM ($6/month)
- Enable monitoring
Setup Queue Worker & Scheduler
See Queue Workers guide for detailed instructions.
Traditional VPS
Similar to DigitalOcean Droplet setup, but with different providers:- Linode
- Vultr
- Hetzner
- Create Linode (Nanode 1GB: $5/month)
- Follow Ubuntu server setup steps above
- Configure Linode firewall
Shared Hosting
If shared hosting is your only option:- Ensure PHP 8.2+ is available
- Database access (MySQL)
- Composer available
- SSH access (required)
- Ability to run cron jobs
- Queue workers may not work properly
- Performance will be limited
- Limited control over PHP configuration
Comparison Table
| Feature | Forge | Vapor | DigitalOcean | VPS |
|---|---|---|---|---|
| Ease of Setup | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ |
| Cost | $12 + server | $39 + AWS | $6-12 | $5-10 |
| Auto-Scaling | ❌ | ✅ | Limited | ❌ |
| Queue Workers | ✅ Auto | ✅ Auto | Manual | Manual |
| SSL Management | ✅ Auto | ✅ Auto | ✅ Auto | Manual |
| Zero-Downtime | ✅ | ✅ | ✅ | Manual |
| Learning Curve | Low | Medium | Medium | High |
| Control Level | Medium | Low | High | Full |
Post-Deployment Verification
After deploying to any platform:Test Application
Test Application
- Visit homepage
- Register test account
- Verify email is sent
- Login successfully
- Create test appointment
- Verify confirmation email
Check Queue Worker
Check Queue Worker
Verify Scheduler
Verify Scheduler
Test Performance
Test Performance
- Check page load times
- Verify assets load correctly
- Test under expected load
- Monitor error logs
Next Steps
Queue Workers
Configure background job processing
Monitoring
Set up application monitoring
Backup Strategy
Configure automated backups
Performance
Optimize application performance