Let docker deployments bind published ports to one host address - #660
Open
xianjixiance wants to merge 1 commit into
Open
Let docker deployments bind published ports to one host address#660xianjixiance wants to merge 1 commit into
xianjixiance wants to merge 1 commit into
Conversation
The docker target publishes core and the web surfaces with a bare host:container mapping, so they listen on every interface of the host. On a machine with a public address that is an exposure the operator has to paper over with firewall rules outside qm. Add "bindAddress" to the config (an IPv4 or IPv6 literal, overridable per invocation with QM_BIND_ADDRESS) and prefix every published port with it; the deployment-layer transport and the printed service URLs follow the same address. Omitting it keeps today's behaviour.
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.
Summary
The docker target publishes core and the web surfaces with a bare
host:containermapping, so they listen on every interface of the host. On a machine with a public address that is an exposure the operator has to paper over with firewall rules outside qm, and a firewall rule inDOCKER-USERdoes not cover the IPv6 path through docker-proxy.This adds
bindAddressto the config: an IPv4 or IPv6 literal, overridable per invocation withQM_BIND_ADDRESS, that prefixes every published host port. The deployment-layer transport and the URLsqm upandqm outputsprint follow the same address. Omitting it keeps today's behaviour.Notes
net.isIP), not hostnames, so a typo cannot silently publish on all interfaces.-psyntax and for the printed URLs.sandbox.backend: "local"the sandboxes reach core throughPUBLIC_API_URL, so the bind address has to stay routable from the sandbox daemon's containers; the docs say so, and loopback is not a candidate there.Verification
npm run typecheckand the CLI typecheck pass.cli/test/config.test.tsgains cases for valid IPv4 and IPv6 literals and for a hostname, an empty string, and a number being rejected;cli/test/docker-secrets.test.tsnow asserts the published port carries the address prefix.eslintandprettier --checkon the touched files pass.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.