Repository navigation
fix: keep all additional traefik port bindings sharing one target port - #5559
Open
Tyagiquamar wants to merge 1 commit into
Open
Tyagiquamar wants to merge 1 commit into
Tyagiquamar wants to merge 1 commit into
Conversation
Standalone traefik setup keyed PortBindings by targetPort/protocol and replaced the entry on each iteration, so only the last published port survived. Append to the existing entry instead. Fixes Dokploy#5509
Comment on lines
+46
to
+48
| portBindings[portKey].push({ | ||
| HostPort: port.publishedPort.toString(), | ||
| }); |
Contributor
There was a problem hiding this comment.
Dashboard binds port 8080 twice
When an admin enables the dashboard on standalone Traefik, setup adds an 8080/tcp binding before applyAdditionalPortBindings appends the same host port again. Docker receives two requests to bind port 8080, which can stop Traefik from starting. Keep distinct published ports, but skip a binding that already exists.
This branch has not been deployed
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.
Standalone traefik setup keyed PortBindings by targetPort/protocol and replaced the entry on each iteration, so when two additional port mappings shared a targetPort only the last published port survived on dokploy-traefik.
Appends to the existing entry instead, matching Docker's PortBindings model (one key, array of HostPort entries). The Swarm path already uses a flat array and is unaffected.
Fixes #5509
Validation:
This PR is not safe to merge until standalone dashboard setup avoids the duplicate 8080 binding.
Summary
Standalone Traefik now keeps every published port that shares a target port and protocol, matching Docker’s list-based binding format.
Reviews (1) · Last reviewed commit: "fix: keep all additional traefik port bi..."