; WhatsApp SaaS - Laravel Horizon Supervisor Configuration
; Copy this file to /etc/supervisor/conf.d/whatsmark-horizon.conf
; Replace {{PROJECT_PATH}} with your actual project path
; Replace {{WEB_USER}} with your web server user (www-data, nginx, apache, etc.)

[program:whatsmark-horizon]
process_name=%(program_name)s_%(process_num)02d
command=php {{PROJECT_PATH}}/artisan horizon
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user={{WEB_USER}}
numprocs=1
redirect_stderr=true
stdout_logfile=/dev/null
stderr_logfile=/dev/null
stopwaitsecs=3600
environment=LARAVEL_ENV="production"

; Example with actual paths:
; Replace {{PROJECT_PATH}} with: /var/www/html/whatsmark-saas
; Replace {{WEB_USER}} with: www-data

; After creating this file:
; sudo supervisorctl reread
; sudo supervisorctl update
; sudo supervisorctl start whatsmark-horizon:*
