This guide is designed for deploying Dineflo to a production server (Apache/Nginx with PHP 8.2+).
Ensure your server meets the following:
- PHP 8.2+ with necessary extensions (intl, gd, bcmath, pdo_mysql).
- MySQL 8.0+ or MariaDB.
- Node.js 18+ (for building assets).
- HTTPS Certificate (required for secure payment gateway and PWA).
- Composer (v2+).
Upload the project folder to your server (/var/www/dineflo or similar).
Create your production environment file:
cp .env.example .env
php artisan key:generate --forceUpdate your .env with production data:
APP_ENV=productionAPP_DEBUG=falseAPP_URL=https://your-domain.comDB_DATABASE,DB_USERNAME,DB_PASSWORD.MAIL_MAILER,MAIL_HOST,MAIL_PASSWORD, etc. (SMTP connection).
Ensure the following directories are writable by the web server (e.g., www-data):
chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache# Clone to server root first
composer install --no-dev --optimize-autoloaderCompile your JS/CSS for production (Minified):
npm install
npm run buildLink the storage to the public directory:
php artisan storage:linkRun the standard Laravel optimization:
php artisan config:cache
php artisan route:cache
php artisan view:cacheAdd the following entry to your server's crontab (crontab -e -u www-data):
* * * * * cd /var/www/dineflo && php artisan schedule:run >> /dev/null 2>&1This enables daily license pings, expiration warnings, and automated reports.
Dineflo v2 mendukung dua jenis koneksi real-time yang dapat diatur melalui Admin Dashboard > Settings > Manage Settings > Real-time (Broadcasting).
Jika Anda menggunakan hosting biasa, gunakan Pusher untuk kemudahan instalasi:
- Pilih Cloud Service (Pusher) di panel admin.
- Masukkan API Key dari pusher.com.
- Klik Simpan. Tidak perlu konfigurasi server tambahan.
Jika Anda menggunakan VPS, Anda bisa menggunakan Reverb (gratis):
- Pilih Internal Server (Laravel Reverb) di panel admin.
- Jalankan server Reverb di terminal VPS Anda:
php artisan reverb:start
- Agar tetap berjalan di latar belakang, gunakan nohup atau Supervisord:
Akses via Supervisord (Produksi):
Buat file /etc/supervisor/conf.d/dineflo-reverb.conf:
[program:dineflo-reverb]
command=php /var/www/dineflo/artisan reverb:start
autostart=true
autorestart=true
user=www-data
redirect_stderr=true
stdout_logfile=/var/www/dineflo/storage/logs/reverb.logLalu aktifkan:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start dineflo-reverb- Navigate to
https://your-domain.com. - The Web Installer will automatically launch because
installed.lockis missing. - Follow the same activation steps as in Localhost Installation with enhanced features:
- Auto-SSL Detection: The installer detects
httpsin yourAPP_URLand automatically configures Reverb to use Secure WebSockets (WSS) on port 443. - Background Engine Startup: Upon finalization, the installer attempts to run
nohup php artisan reverb:start &to start real-time features immediately. - Permission Sync: The installer automatically triggers
php artisan dineflo:sync-permissionsto ensure all roles are correctly configured. - License Verification: Authenticate your production instance with the 3FLO Central Hub.
- Auto-SSL Detection: The installer detects
- Once completed, the system will be locked for production use.
Important
While the installer attempts a background startup, we still highly recommend setting up Supervisor (Step 2 above) to ensure the Reverb engine restarts automatically if the server reboots or crashes.
- Turn off Debug Mode: Always keep
APP_DEBUG=falsein production. - Cloudflare/SSL: Recommended for DDoS protection and encrypted connections.
- Rate Limiting: Pre-configured in the API with 60 requests/minute.