Using laravel websockets package in docker environment Using laravel websockets package in docker environment laravel laravel

Using laravel websockets package in docker environment


maybe try to edit the .env file to use host.docker.internallike so

PUSHER_APP_ID=123456789PUSHER_APP_KEY=AZERTYUIOPPUSHER_APP_SECRET=QSDFGHJKLMWXCVBNPUSHER_APP_CLUSTER=mt1PUSHER_APP_HOST=host.docker.internal

after than run php artisan config:cache


0

Good day I got a websocket server running on a Docker build by using Laravel Echo image to build my docker and then setting my app and portal(the second application) To authenticate with the socket server and I could send messages vice versa. This is Laravel echo docker image I used to build my docker stack https://github.com/oanhnn/docker-laravel-echo-server

I don't think using the artisan websockets:serve would work as you are running the socket in a container and would need to expose a port for it. Well atleast I could not get it working that way so I did it with laravel echo.