{{-- Supervisor --}}

Supervisor

The server runs workers and the scheduler under Supervisor. SSH in as root, then use these commands. cd /var/www/html/Cydekick

@php $supervisorCmds = [ ['label' => 'Check all worker status', 'cmd' => 'sudo supervisorctl status'], ['label' => 'Restart all queue workers', 'cmd' => 'sudo supervisorctl restart cydekick-worker:*'], ['label' => 'Restart scheduler', 'cmd' => 'sudo supervisorctl restart cydekick-scheduler'], ['label' => 'Restart workers + scheduler', 'cmd' => 'sudo supervisorctl restart cydekick-worker:* && sudo supervisorctl restart cydekick-scheduler'], ['label' => 'Stop all workers', 'cmd' => 'sudo supervisorctl stop cydekick-worker:*'], ['label' => 'Start all workers', 'cmd' => 'sudo supervisorctl start cydekick-worker:*'], ['label' => 'Reload Supervisor config', 'cmd' => 'sudo supervisorctl reread && sudo supervisorctl update'], ]; @endphp @foreach($supervisorCmds as $item)
{{ $item['label'] }} {{ $item['cmd'] }}
@endforeach

Note: When running artisan commands that change code (deploy, migrate, optimize), always restart workers afterwards so they pick up the new code. Use restart not stop/start — restart waits for the current job to finish gracefully.

{{-- Title Building --}}

Title Building

Two-stage process to build product titles. Always dry-run first. Stage 1 must complete before Stage 2.

Stage 1 — Prefix SKU to title

@php $stage1 = [ ['label' => 'Dry run (first 50)', 'cmd' => 'php artisan inventory:prefix-sku-titles --dry-run --limit=50'], ['label' => 'Dry run (full scale)', 'cmd' => 'php artisan inventory:prefix-sku-titles --dry-run'], ['label' => 'Run for real', 'cmd' => 'php artisan inventory:prefix-sku-titles'], ]; @endphp @foreach($stage1 as $item)
{{ $item['label'] }} {{ $item['cmd'] }}
@endforeach

Stage 2 — Inject LAND ROVER / JAGUAR make label

@php $stage2 = [ ['label' => 'Dry run (first 20)', 'cmd' => 'php artisan inventory:inject-make-to-titles --dry-run --limit=20'], ['label' => 'Dry run (full scale)', 'cmd' => 'php artisan inventory:inject-make-to-titles --dry-run'], ['label' => 'Run for real', 'cmd' => 'php artisan inventory:inject-make-to-titles'], ]; @endphp @foreach($stage2 as $item)
{{ $item['label'] }} {{ $item['cmd'] }}
@endforeach

Stage 2 also exports a CSV of products with no fitment/vendor make data to storage/app/no-fitment-products-YYYY-MM-DD.csv for manual review.

{{-- Cache & Deploy --}}

Cache & Deploy

Run after deploys or when config/route/view changes aren't being picked up.

@php $deployCmds = [ ['label' => 'Clear all caches', 'cmd' => 'php artisan view:clear && php artisan optimize:clear'], ['label' => 'Rebuild optimised cache', 'cmd' => 'php artisan optimize'], ['label' => 'Run migrations', 'cmd' => 'php artisan migrate --force'], ['label' => 'Full deploy sequence', 'cmd' => 'git pull && composer install --no-dev --optimize-autoloader && npm ci --production=false && npm run build && php artisan migrate --force && php artisan view:clear && php artisan optimize:clear && php artisan optimize'], ]; @endphp @foreach($deployCmds as $item)
{{ $item['label'] }} {{ $item['cmd'] }}
@endforeach