Hi. I have a traefik v3.1 configured on a server with multiple services. I just migrated all the configuration files from v2 version to v3.
The websocket service is working flawlessly on Firefox as you can see here:
but it's not working properly on Chrome/Brave (Version 1.68.128 Chromium: 127.0.6533.73 (Official Build) (arm64)):
Anyways from time to time (after many refreshes?) it's working even on Chrome but for a very short period of time. I don't know where can be the related issue. I need some help please. Here is my configuration files:
docker-compose.yml
version: "3.9"
services:
nginx:
image: nginx:1.17.6-alpine
container_name: "${PROJECT_NAME}_nginx"
restart: unless-stopped
volumes:
- ./:/var/html
- ".docker/prod/nginx/nginx.conf:/etc/nginx/nginx.conf"
- ".docker/prod/nginx/conf.d/:/etc/nginx/conf.d/"
- ".docker/prod/nginx/server-opts.d/:/etc/nginx/server-opts.d/"
networks:
- mynetwork
soketi:
image: 'quay.io/soketi/soketi:latest-16-alpine'
container_name: "${PROJECT_NAME}_soketi"
restart: unless-stopped
environment:
SOKETI_DEBUG: 0
SOKETI_METRICS_ENABLED: 1
SOKETI_METRICS_SERVER_PORT: 9601
command: soketi start --config=/config/config.json
volumes:
- .docker/prod/soketi/:/config
networks:
- mynetwork
traefik:
image: "traefik:v3.1"
container_name: "traefik"
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
- "APP_DOMAIN=${APP_DOMAIN}"
- "CF_API_EMAIL=${CF_API_EMAIL}"
- "CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN}"
- "TZ=Europe/Bucharest"
volumes:
- "./.docker/prod/traefik:/etc/traefik/"
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- mynetwork
networks:
mynetwork:
name: "${PROJECT_NAME}_network"
driver: bridge
traefik.yml
global:
checkNewVersion: true
log:
level: INFO
providers:
providersThrottleDuration: 2s
file:
filename: /etc/traefik/fileConfig.yml
watch: true
docker:
exposedByDefault: false
watch: true
entrypoints:
web:
address: :80
forwardedHeaders:
trustedIPs:
- 127.0.0.1/32
- 172.20.0.0/24
- 103.21.244.0/22
- 103.22.200.0/22
- 103.31.4.0/22
- 104.16.0.0/13
- 104.24.0.0/14
- 108.162.192.0/18
- 131.0.72.0/22
- 141.101.64.0/18
- 162.158.0.0/15
- 172.64.0.0/13
- 173.245.48.0/20
- 188.114.96.0/20
- 190.93.240.0/20
- 197.234.240.0/22
- 198.41.128.0/17
- 2400:cb00::/32
- 2606:4700::/32
- 2803:f800::/32
- 2405:b500::/32
- 2405:8100::/32
- 2a06:98c0::/29
- 2c0f:f248::/32
http:
redirections:
entryPoint:
to: websecure
scheme: https
permanent: true
websecure:
address: :443
http:
tls:
certResolver: myresolver
domains:
main: "${APP_DOMAIN}"
sans:
- "*.${APP_DOMAIN}"
certificatesResolvers:
myresolver:
acme:
dnsChallenge:
provider: cloudflare
delayBeforeCheck: 10
email: user@example.com
storage: /letsencrypt/acme.json
api:
dashboard: true
insecure: false
fileConfig.yml
# Dynamic configuration
tls:
options:
default:
sniStrict: true
http:
routers:
nginx:
entryPoints:
- websecure
rule: "Host(`{{env "APP_DOMAIN"}}`) || HostRegexp(`.+.{{env "APP_DOMAIN"}}`)"
service: nginx
tls:
certResolver: myresolver
priority: 10
soketi:
entryPoints:
- websecure
rule: Host(`events.{{env "APP_DOMAIN"}}`)
service: soketi
tls:
certResolver: myresolver
priority: 100
traefik-dashboard:
entryPoints:
- websecure
rule: Host(`traefik.{{env "APP_DOMAIN"}}`)
service: api@internal
tls:
certResolver: myresolver
priority: 100
middlewares:
- traefik-dashboard-auth
middlewares:
traefik-dashboard-auth:
basicauth:
usersFile: "/etc/traefik/users"
services:
nginx:
loadbalancer:
servers:
- url: "http://nginx:80"
soketi:
loadbalancer:
servers:
- url: "http://soketi:6001"