#!/bin/bash
## Description: Run Laravel dev workers (queue, log tail, vite) inside the web container.
## Usage: dev
## Example: ddev dev
## ProjectTypes: laravel

set -euo pipefail

cd /var/www/html

exec npx --yes concurrently \
    -c "#c4b5fd,#fb7185,#fdba74" \
    --names=queue,logs,vite \
    --kill-others \
    "php artisan queue:listen --tries=1 --timeout=0" \
    "php artisan pail --timeout=0" \
    "npm run dev"
