did you find any answer to this one?
Problem with supervisor, sudo and laravel-websockets on production server
I'm using laravel websockets on my laravel production app, in my ubuntu VPS (DigitalOcean) when I do this:
sudo sudo php artisan websockets:serve --port=6001
I CAN connect to my websockets server from my client, it just works!
Now when I exit my server I exit from my server Pusher loses conenction and I can't receive any events, because of this I tried with supervisor and created my websockets.conf file, which looks like this:
[program:websockets]
command=/usr/bin/php /var/www/wooloveapp.com/laravel/artisan websockets:serve --port=6001
numprocs=1
autostart=true
autorestart=true
user=root
startsecs=0
stderr_logfile=/var/log/wooloveapp.com/websockets.err.log
stdout_logfile=/var/log/wooloveapp.com/websockets.out.log
I check it's RUNNING with sudo supervisorctl status, but it says connecting -> unavailable
TO SUMMARIZE: I can only connect to websockets when I manually type the command (apparently sudo is needed) but now with supervisor running and active
sudo sudo php artisan websockets:serve --port=6001
I also tried setting my profile with sudo privileges instead of root user but still it's not working...
How can I add sudo to this line:
command=/usr/bin/php /var/www/wooloveapp.com/laravel/artisan websockets:serve --port=6001
Please or to participate in this conversation.