Custom domain with docker swarm doesnt work
Open
Nobody has claimed this yet.
bug
needs-triage🔍
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
To Reproduce
- Deploy docker stack
- Create custom domain and enter valid container port with your app
- Make dns return ip of dokploy
Current vs. Expected behavior
Current behavior:
When try to make request to my custom domain revives 502 Bad Gateway
Expected behaviour:
Receive my app response
Provide environment information
Dokploy version: v0.28.8
OS:
- Distributor ID: Ubuntu
- Description: Ubuntu 24.04.4 LTS
- Release: 24.04
- Codename: noble
Which area(s) are affected? (Select all that apply)
Traefik
Are you deploying the applications where Dokploy is installed or on a remote server?
Remote server
Additional context
docker stack
services:
frontend:
image: my_registry/image:latest
deploy:
mode: replicated
replicas: ${FRONTEND_REPLICAS:-1}
restart_policy:
condition: any
labels:
- traefik.swarm.network=dokploy-network
- traefik.http.routers.{CONTAINER_NAME}.rule=Host(`my.domain`)
- traefik.http.routers.{CONTAINER_NAME}-web.entrypoints=web
- traefik.http.services.{CONTAINER_NAME}-web.loadbalancer.server.port=80
- traefik.http.routers.{CONTAINER_NAME}-web.service=gvop-gvopswarm-r6lsez-1-web
- traefik.http.routers.{CONTAINER_NAME}-web.middlewares=redirect-to-https@file
- traefik.http.routers.{CONTAINER_NAME}-websecure.rule=Host(`my.domain`)
- traefik.http.routers.{CONTAINER_NAME}-websecure.entrypoints=websecure
- traefik.http.services.{CONTAINER_NAME}-websecure.loadbalancer.server.port=80
- traefik.http.routers.{CONTAINER_NAME}-websecure.service=gvop-gvopswarm-r6lsez-1-websecure
- traefik.http.routers.{CONTAINER_NAME}-websecure.tls.certresolver=letsencrypt
- traefik.enable=true
networks:
- dokploy-network
- default
networks:
dokploy-network:
external: true
Will you send a PR to fix it?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the supplied Docker stack, Dokploy v0.28.8 environment, and Traefik labels to reproduce the custom-domain request on Ubuntu 24.04. Trace Dokploy’s Docker Swarm and Traefik handling for remote deployments; done means the configured domain reaches the app and returns its response instead of a 502 Bad Gateway.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100