Document deploying behind Coolify - #14
Merged
Merged
Conversation
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
### Coolifyunder Install, between Docker and Binariesexposeadded in Declare the port a reverse proxy should send traffic to #13Why
Coolify derives the Traefik backend port by parsing it out of the domain string, in
bootstrap/helpers/docker.php:With a domain of
https://nudo.example.comand no port, the generated labels contain routers matching the hostname and noloadbalancer.server.port. Traefik matches the request, has no backend, and answers 502 — in front of a container that started cleanly and passed its healthcheck, which is what makes this hard to place from the symptom.Worth stating explicitly in the docs because the obvious candidates all look right and none of them work:
expose, a publishedportsmapping, and the Connect To Predefined Network toggle. None is an input to the code above.The section also covers
NUDO_BASE_URL, which is a second, quieter failure:auth.rs:152derives the session cookie'sSecureflag from the scheme alone, so left at thehttp://localhost:3000default behind HTTPS the login page renders and the session silently fails to persist. It is also the base for webhook callback URLs (webhook.rs:347).On the
exposecomment#13 added
exposewith a comment claiming Coolify reads it to learn the port. The source above shows it does not. The key is kept — stating the dashboard's port in the file a reader is looking at earns its line — but the stated reason was wrong and would send the next person down the same path.Validation
NUDO_SECRET_KEY=validation-only docker compose config --quietNUDO_BASE_URLclaims againstcrates/web/src/auth.rs,crates/web/src/routes/auth.rs,crates/web/src/webhook.rsgit diff --check; heading order confirmed (### Docker→### Coolify→### Binaries)