D
Dokploy•2mo ago
Adel

Need help: Traefik issue

Hello there, I've been trying to deploy 2 apps today, one of them on api.mydomain and the other on my domain but unfortunately i keep receiving 404 not found as response, i did find this issue deploying 2 other projects and i fixed it by manually editing the yml config, but today i woke up and decided that ill apply this routing automatically 😅 here is what I've done so far: - pointed my domain to my server and added the sub domain too - added the dokploy-network - added the labels with unique names and correct ports - verified the networking between my services and traefik manually by entering each service then ping - looked into GitHub issues and docs and changed the expose: to ports: - restarted the traefik and the server many times - tried adding the domain manually from the domain tab - tried generating a random domain from the domain tab - tried checking the traefik logs but its empty And yet, i still get 404 not found trying to access my services Also im using the lastest version Ps: i also checked the traefik files after deployment and nothing new was added to them after the deployment its still the same since i installed dokploy
1 Reply
Adel
AdelOP•2mo ago
7 hours later, still couldn't make it work, so i went back to the manual way, you keep the labels in compose:
- traefik.enable=true
- traefik.http.routers.api-app.rule=Host(`api.example.com`)
- traefik.http.routers.api-app.entrypoints=web
- traefik.http.services.api-app.loadbalancer.server.port=3000
- traefik.enable=true
- traefik.http.routers.api-app.rule=Host(`api.example.com`)
- traefik.http.routers.api-app.entrypoints=web
- traefik.http.services.api-app.loadbalancer.server.port=3000
then change the dokploy.yml (you can find it on the traefik window)
http:
routers:
api-router:
rule: Host(`api.example.com`)
service: api-service
entryPoints:
- web
- websecure
front-router:
rule: Host(`example.com`)
service: front-service
entryPoints:
- web
- websecure
services:
api-service:
loadBalancer:
servers:
- url: http://api-container:3000
front-service:
loadBalancer:
servers:
- url: http://frontend-container:8080
http:
routers:
api-router:
rule: Host(`api.example.com`)
service: api-service
entryPoints:
- web
- websecure
front-router:
rule: Host(`example.com`)
service: front-service
entryPoints:
- web
- websecure
services:
api-service:
loadBalancer:
servers:
- url: http://api-container:3000
front-service:
loadBalancer:
servers:
- url: http://frontend-container:8080

Did you find this page helpful?