Open nonodev96 opened 2 days ago
Hello @nonodev96
When using names
you should use the container name, not the service name within compose.
How to fix it ?
You can use the value that you submit as container_name
. So it would be: "${PROJECT_NAME}_traefik_whoami"
.
The error is not clear though, it will be updated soon for better output.
My recommendation is to use group
instead and register your containers via labels.
See: https://sablierapp.dev/#/providers/docker?id=register-containers
Which would be:
traefik_sablier:
image: sablierapp/sablier:1.8.1
container_name: "${PROJECT_NAME}_traefik_sablier"
networks:
- proxy
- backend
depends_on:
- traefik
command:
- start
- --provider.name=docker
- --logging.level=trace
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
traefik_whoami:
image: traefik/whoami
container_name: "${PROJECT_NAME}_traefik_whoami"
networks:
- proxy
- backend
labels:
- sablier.enable=true
- sablier.group=whoami
And then change
http:
middlewares:
app-sablier:
plugin:
plugin-traefik-sablier:
sablierUrl: http://traefik_sablier:10000
group: whoami # Will wake up all containers with label sablier.group=whoami
sessionDuration: 1m
dynamic:
displayName: My Title # (Optional) Defaults to the middleware name
showDetails: true # (Optional) Set to true or false to show details specifcally for this middleware, unset to use Sablier server defaults
theme: hacker-terminal # (Optional) The theme to use
refreshFrequency: 5s # (Optional) The loading page refresh frequency
routers:
whoami:
rule: "Host(`whoami.nonodev96.dev`)"
entryPoints:
- websecure
middlewares:
- app-sablier@file # COMMENT TO TEST
service: "whoami-svc"
tls: {}
services:
whoami-svc:
loadBalancer:
servers:
- url: "http://traefik_whoami:80"
Does that make sense ?
I've been troubleshooting it, and it’s working now. Initially, I thought it was a bug since there was no warning.
Have you considered the possibility of using 'names' and 'group' as a YAML list instead of separating them with commas?
Thank you very much, the project is aweome!"
Describe the bug With version 1.8.1 of traefik plugin sablier not working
Logs of sablier container
Steps to reproduce
Docker version
```log Client: Version: 27.3.1 API version: 1.47 Go version: go1.22.7 Git commit: ce12230 Built: Fri Sep 20 11:39:44 2024 OS/Arch: linux/amd64 Context: default Server: Docker Desktop () Engine: Version: 27.3.1 API version: 1.47 (minimum version 1.24) Go version: go1.22.7 Git commit: 41ca978 Built: Fri Sep 20 11:41:11 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.21 GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0 ```Docker compose
```yml traefik_sablier: image: sablierapp/sablier:1.8.1 container_name: "${PROJECT_NAME}_traefik_sablier" networks: - proxy - backend depends_on: - traefik command: - start - --provider.name=docker - --logging.level=trace volumes: - '/var/run/docker.sock:/var/run/docker.sock' traefik_whoami: image: traefik/whoami container_name: "${PROJECT_NAME}_traefik_whoami" networks: - proxy - backend ```Static config traefik
```yml experimental: plugins: plugin-traefik-sablier: moduleName: "github.com/sablierapp/sablier" version: "v1.8.1" ```Dynamic config traefik
```yml http: middlewares: app-sablier: plugin: plugin-traefik-sablier: sablierUrl: http://traefik_sablier:10000 names: traefik_whoami # Comma separated names of containers/services/deployments etc. sessionDuration: 1m dynamic: displayName: My Title # (Optional) Defaults to the middleware name showDetails: true # (Optional) Set to true or false to show details specifcally for this middleware, unset to use Sablier server defaults theme: hacker-terminal # (Optional) The theme to use refreshFrequency: 5s # (Optional) The loading page refresh frequency routers: whoami: rule: "Host(`whoami.nonodev96.dev`)" entryPoints: - websecure middlewares: - app-sablier@file # COMMENT TO TEST service: "whoami-svc" tls: {} services: whoami-svc: loadBalancer: servers: - url: "http://traefik_whoami:80" ```