Dokploy / Dokploy/dokploy

Compose service domain may keep returning 502 until the domain is deleted and recreated

Open
#3,945 14 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

awaiting-feedback
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

To Reproduce

Problem

A domain attached to a Docker Compose sub-service may return 502 Bad Gateway even though the target container is healthy and the app responds correctly on the configured internal port.

A normal redeploy does not always fix it.

What fixes it reliably is:

  1. delete the domain in Dokploy
  2. create the same domain again
  3. redeploy / refresh routing

Expected

If a Compose sub-service is healthy and the domain points to the correct internal port, redeploy should be enough.

Deleting and recreating the domain should not be required.

Actual

  • container is up
  • service responds correctly inside the container
  • public domain still returns 502
Current vs. Expected behavior

Example:

docker exec <container> sh -lc 'wget -qO- http://127.0.0.1:8080/healthz'
{"status":"ok"}

curl -fsS https://<domain>/healthz
curl: (22) The requested URL returned error: 502

### Provide environment information

```bash
ubuntu 24.04
Dokploy Version v0.28.4
Compose App
Which area(s) are affected? (Select all that apply)

Application

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

No response

Will you send a PR to fix it?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Reproduce the failure with a Docker Compose sub-service, a healthy internal health endpoint, and a domain returning 502; then trace the domain and redeploy routing path. Done means redeploying updates routing so the domain works without deleting and recreating it.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.