Declare the port a reverse proxy should send traffic to - #13
Merged
Conversation
Coolify generates Traefik routers from the compose file, but it reads `expose` to learn the backend port. With only a published `ports` mapping it emitted routers with no `loadbalancer.server.port`, so Traefik matched the host and then had nowhere to send the request: a 502 in front of a container that was running and healthy. `expose` is redundant for a plain `docker compose up`, where the published port already reaches the container. It is kept alongside `ports` rather than replacing it so `localhost:3000` keeps working, as the README documents. Also drops a comment on container_name that named the wrong cause. Coolify overrides that key with its own generated name, so it was never the reason the proxy could not reach the container.
Loa212
added a commit
that referenced
this pull request
Jul 30, 2026
Coolify decides the Traefik backend port by parsing it out of the domain string — `https://nudo.example.com:3000` — and emits the label naming that port only when it finds one. Without it the generated config has a router matching the hostname and no service behind it, so the proxy answers 502 in front of a container that started and passed its healthcheck. Nothing about the compose file changes that, which is what makes it worth writing down: `expose`, a published `ports` mapping and the predefined-network toggle all look like the thing to reach for and none of them are. Also corrects the comment on `expose` added in #13, which claimed Coolify reads that key to learn the port. It does not. The key is kept because stating the dashboard's port in the file is worth a line on its own, but the reason given for it was wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
expose: ["3000"]alongside the existingportsmappingcontainer_namethat named the wrong causeWhy
Coolify generates Traefik routers from the compose file, but reads
exposeto learn the backend port. With only a publishedportsmapping, the generated labels contain routers:but no
traefik.http.services.….loadbalancer.server.port. Traefik matches the host and then has nowhere to send the request — a 502 in front of a container that is running and healthy (nudo is running — open the dashboard to finish setup dashboard=0.0.0.0:3000).exposeis redundant for a plaindocker compose up, where the published port already reaches the container. It is kept alongsideportsrather than replacing it solocalhost:3000keeps working, as the README documents.The
container_namecomment added in #12 named a cause that the generated compose disproves: Coolify overrides that key with its own name (nudo-hwi4754bcs2gz3o9ri2az61n-082055878291), so it was never why the proxy could not reach the container. Dropping the key is still right — nothing refers to the container by name — but the stated reason was wrong.Validation
NUDO_SECRET_KEY=validation-only docker compose config --quietexpose: ["3000"]andpublished: "3000", so neither path regressesgit diff --cached --check