Production Deployment
- Introduction
- Automated VPS Deployment (
./reyhan install --prod) - Production Docker Architecture
- Nginx & Caddy Configuration
- Queue Workers with Laravel Horizon
- High-Traffic Performance Optimization Checklist
Introduction
When you are ready to deploy your Reyhan Commerce application to production, there are several essential steps you should take to ensure your store runs as efficiently and reliably as possible.
Reyhan Commerce is engineered for containerized cloud deployment using Docker, FrankenPHP / Laravel Octane, and Caddy automated TLS reverse proxying.
Automated VPS Deployment (./reyhan install --prod)
To provision a fresh Linux VPS or cloud server:
./reyhan install --prodThis command automatically:
- Validates host Docker and Docker Compose availability.
- Generates secure production environment keys.
- Initializes the FrankenPHP Octane container stack.
- Provisions automated SSL certificates via Caddy and Let's Encrypt.
- Executes database migrations and caches config and routes.
Production Docker Architecture
┌─────────────────────────────────────────────────────────────┐
│ Caddy Automatic HTTPS Reverse Proxy │
│ (Port 80/443 -> Automatic SSL & HTTP/3) │
└──────────────────────────────┬──────────────────────────────┘
│
┌──────────────────────┴──────────────────────┐
▼ ▼
┌──────────────────────────────┐ ┌──────────────────────────────┐
│ FrankenPHP Octane Worker │ │ Horizon Queue Workers │
│ (Backend API & Filament) │ │ (SMS, Webhooks, Emails) │
└──────────────┬───────────────┘ └──────────────┬───────────────┘
│ │
└───────────────────┬──────────────────┘
▼
┌─────────────────────────────────────────────────────────────┐
│ Standalone Enterprise Tier │
│ PostgreSQL 17 (DB Engine) + Redis 7 (Queues/Cache) │
└─────────────────────────────────────────────────────────────┘Nginx & Caddy Configuration
Reyhan includes a production Caddyfile that automatically negotiates Let's Encrypt certificates and routes API and administrative traffic to FrankenPHP:
api.mystore.com {
reverse_proxy php:8000
encode gzip zstd
}Queue Workers with Laravel Horizon
To process background jobs (SMS notifications, stock releases, ledger accounting):
php artisan horizonHigh-Traffic Performance Optimization Checklist
Before taking your store live, ensure you have completed the following optimizations:
1. Optimize Configuration & Route Loading
php artisan config:cache
php artisan route:cache
php artisan view:cache2. Configure Octane Worker Concurrency
Set OCTANE_WORKERS to match (2 * CPU cores) in your production .env file.
3. Enable OPcache & JIT Compilation
Ensure OPcache JIT is enabled in your production PHP INI configuration:
opcache.enable=1
opcache.jit_buffer_size=100M
opcache.jit=12554. Enable PgBouncer Connection Pooling
For high-traffic deployments with hundreds of concurrent workers, enable PostgreSQL connection pooling via PgBouncer.