traefik version
)?v1.1.2
Traefik run as a service in a Docker Swarm cluster.
Cluster is made of 2 Debian Jessie (8.6) virtual machines. Docker version is 1.12.3
.
The Traefik service is run with the following command.
docker service create \
--name traefik \
--publish 80:80 --publish 443:443 --publish 8080:8080 \
--label traefik.frontend.entryPoints=http,https,ws,wss \
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
--mount type=bind,source=/DATA/WEB/traefik/traefik.toml,target=/etc/traefik/traefik.toml \
--mount type=bind,source=/DATA/WEB/traefik/certs,target=/certs \
--network my-network \
--mode global \
traefik \
--docker \
--docker.swarmmode \
--docker.domain=swarm.mydomain.net \
--docker.watch \
--logLevel=DEBUG \
--web
The traefik.toml
file configuration is :
logLevel = "DEBUG"
debug = true
defaultEntryPoints = ["http", "https","ws","wss"]
[entryPoints]
[entryPoints.http]
address = ":80"
compress = false
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
compress = false
[entryPoints.https.tls]
[acme]
email = "[email protected]"
storageFile = "/certs/acme.json"
entryPoint = "https"
onDemand = true
[[acme.domains]]
main = "swarm.mydomain.net"
[web]
address = ":8080"
I use Traefik as reverse proxy for other services and to manage Let's Encrypt certificates.
One of the services is a Mattermost instance, running with the following command.
docker service create \
--name mattermost \
--replicas 1 \
--label traefik.port=80 \
--label traefik.frontend.rule=Host:team.mydomain.net \
--label traefik.backend.loadbalancer.sticky=true \
--label traefik.frontend.passHostHeader=true \
--label traefik.frontend.entryPoints=http,https,ws,wss \
--mount type=bind,source=/DATA/MIDDLE/mattermost/config,target=/mattermost/config \
--mount type=bind,source=/DATA/MIDDLE/mattermost/data,target=/mattermost/data \
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
--network my-network \
--with-registry-auth \
registry.mydomain.net:5000/custom-mattermost
Mattermost should works fine. Other services have no problem with Traefik (webservers essentially)
According to Mattermost issues we currently have, it seems that websockets are not working. Mattermost app works fine, there is only issues with functionalities which need websockets.
I think there is something to do with my configuration to fix this, but I didn't find any example/tutorial to set up websockets with Traefik.
Was this resolved or why was it closed? I am having the same trouble.
My issue was on another part of my configuration, so I manage to made it works. But there is a lack of documentation about Traefik and websockets. We can re-open if someone want to work on documentation ?
There are already a bunch of websocket-related issues; we need to consolidate them into one and close the duplicates, but I don't think it's necessary to keep this one in particular open if the OP's problem was unrelated.
As far as documentation is concerned, there's already #1027.
Most helpful comment
There are already a bunch of websocket-related issues; we need to consolidate them into one and close the duplicates, but I don't think it's necessary to keep this one in particular open if the OP's problem was unrelated.
As far as documentation is concerned, there's already #1027.