I've spent a week trying to figure out why my browser's console throws:
WebSocket connection to 'wss://domain.com/ws' failed
WebSocket connection to 'wss://domain.com:6042/' failed
I'm using docker compose.
I have containers running behind Traefik on the same docker network, one of them is a websocket container, and one nginx container for serving static content.
All incoming requests are https. Websocket is listening on port 6042.
I've tried these labels on my websocket container, without any success:
Not sure where you got this from, but it does not seem to be a part of Traefik v2, according to the docs.
I would expect that you do not need any Websocket specific configuration in Traefik, it seems to work with just a regular http/https configuration.
WebSocket "is designed to work over HTTP ports 443 and 80 as well as to support HTTP proxies and intermediaries", thus making it compatible with HTTP. (Wikipedia)
I've literally tried everything That was one of the hundred tries.
Then I dont need to put it on different entrypoint, I just need to set 443 as entrypoint of the websocket container? My websocket container is on port 6042.
I've dig up the debug logs already, in this case the dashboard didnt help too.
Yes, you should be able to run es on the regular SSL port, the services will be routed to by domain and path. Just make sure your ws service is listening on websecure and you have the labels for TLS in place.