Production & Docker Deployment
Reyhan Commerce is engineered for enterprise-grade containerized deployment using Docker, FrankenPHP / Laravel Octane, and Caddy automated SSL reverse-proxying.
1. Single-Command Production Setup
To provision a live VPS or cloud server:
bash
./reyhan install --prodThis command automatically:
- Validates host Docker daemon and Compose availability.
- Configures production
.envparameters (generating 64-byte cryptographic keys). - Spawns high-performance FrankenPHP workers with in-memory application caching.
- Initializes Caddy with automatic Let's Encrypt TLS certificate provisioning.
2. Production Docker Architecture
text
┌─────────────────────────────────────────────────────────────┐
│ 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) │
└─────────────────────────────────────────────────────────────┘
▲
│ RESTful APIs (/api/v1) & WebSockets
▼
┌─────────────────────────────────────────────────────────────┐
│ Decoupled Client Layers │
│ (Official Nuxt 4 Storefront, Flutter, React Native, CMS) │
└─────────────────────────────────────────────────────────────┘3. High-Traffic Optimization Checklist
- Octane Workers: Set
OCTANE_WORKERSto match(2 * CPU cores). - Redis Persistence: Enable AOF (Append Only File) persistence on your Redis host.
- OPcache: Ensure JIT (Just-In-Time) compilation is active in production PHP INI.
- Database Connection Pooling: Utilize PgBouncer for high-concurrency connection reuse.