D
Dokploy•4mo ago
Motysten

Domains not working with Docker Stack

Hi, I am trying to deploy Dokploy on Scaleway with 3 Instances DEV1-M (4Go each). My cluster is set up and I can see my nodes on the panel. Everything seems to be working fine BUT Docker Stacks. If I use Docker Compose I have no problem but when I try to deploy an app with Docker Stack, Traefik won't create the LB rule. Here is the generated Compose file with Traefik labels :
services:
web:
image: traefik/whoami
labels:
- traefik.enable=true
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.rule=Host(`backendtest-whoami-stack-xwj8ep-c5c661-51-15-139-105.traefik.me`)
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.entrypoints=web
- traefik.http.services.backendtest-whoami-stack-xwj8ep-22-web.loadbalancer.server.port=80
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.service=backendtest-whoami-stack-xwj8ep-22-web
networks:
- dokploy-network
networks:
dokploy-network:
external: true
services:
web:
image: traefik/whoami
labels:
- traefik.enable=true
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.rule=Host(`backendtest-whoami-stack-xwj8ep-c5c661-51-15-139-105.traefik.me`)
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.entrypoints=web
- traefik.http.services.backendtest-whoami-stack-xwj8ep-22-web.loadbalancer.server.port=80
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.service=backendtest-whoami-stack-xwj8ep-22-web
networks:
- dokploy-network
networks:
dokploy-network:
external: true
Dokploy version : 0.17.9 Thanks for the help 🙂
No description
2 Replies
Motysten
MotystenOP•4mo ago
I forgot to mention that I'm unable to reload Traefik and the logs are full of errors, but from what I saw on GitHub it's supposed to be "normal" ?
No description
Motysten
MotystenOP•4mo ago
I have fixed the problem manually but I think it should be good for Dokploy to do it automatically. In stack mode, Traefik labels should be under the "deploy" tag and it's not the case here :/ I added manually the labels so my docker compose look like this now (labels are defined twice since Dokploy still automatically add them but in the wrong place) :
services:
web:
image: traefik/whoami
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.rule=Host(`backendtest-whoami-stack-xwj8ep-c5c661-51-15-139-105.traefik.me`)
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.entrypoints=web
- traefik.http.services.backendtest-whoami-stack-xwj8ep-22-web.loadbalancer.server.port=80
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.service=backendtest-whoami-stack-xwj8ep-22-web
labels:
- traefik.enable=true
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.rule=Host(`backendtest-whoami-stack-xwj8ep-c5c661-51-15-139-105.traefik.me`)
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.entrypoints=web
- traefik.http.services.backendtest-whoami-stack-xwj8ep-22-web.loadbalancer.server.port=80
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.service=backendtest-whoami-stack-xwj8ep-22-web
networks:
- dokploy-network
networks:
dokploy-network:
external: true
services:
web:
image: traefik/whoami
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.rule=Host(`backendtest-whoami-stack-xwj8ep-c5c661-51-15-139-105.traefik.me`)
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.entrypoints=web
- traefik.http.services.backendtest-whoami-stack-xwj8ep-22-web.loadbalancer.server.port=80
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.service=backendtest-whoami-stack-xwj8ep-22-web
labels:
- traefik.enable=true
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.rule=Host(`backendtest-whoami-stack-xwj8ep-c5c661-51-15-139-105.traefik.me`)
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.entrypoints=web
- traefik.http.services.backendtest-whoami-stack-xwj8ep-22-web.loadbalancer.server.port=80
- traefik.http.routers.backendtest-whoami-stack-xwj8ep-22-web.service=backendtest-whoami-stack-xwj8ep-22-web
networks:
- dokploy-network
networks:
dokploy-network:
external: true
And now it works To make it more simple : - Docker Compose :
services:
whoami:
image: traefik/whoami
labels:
- traefik.enable: true
- ...
services:
whoami:
image: traefik/whoami
labels:
- traefik.enable: true
- ...
- Docker Stack :
services:
whoami:
image: traefik/whoami
deploy:
labels:
- traefik.enable: true
- ...
services:
whoami:
image: traefik/whoami
deploy:
labels:
- traefik.enable: true
- ...

Did you find this page helpful?