Livekit webhook from docker to vite
Published
So im still trying to get my streaming and recording with livekit to work together. I have my docker compose and tanstack start application. I can connect to the room and have a meeting so to say, but I have been having this weird problem. When I try to start recording from backend using egress client, I need to get a response from livekit with webhook to know if the recording has started. But I am not receiving anything. Then I looked in the logs of livekit-server container and saw that it was failing to connect to host.docker.internal:3000. Apparently when starting vite server I have to provide --host 0.0.0.0. This allows the dev server to be accessible by other hosts, but after adding console.log to the webhook api I still was not getting anything. Looking at the livekit-server container logs it says that the webhook was sent. So what now? Apparently vite is still blocking unknown hosts. So in vite config I have to set
1server: {2 allowedHosts: ['host.docker.internal'],3 host: '0.0.0.0',4 port: 30005}
Now with this server config in vite.config.ts I am finally able to receive livekit webhook events from docker container in my dev environment.
