Skip to content

docs(adr): 0048, a container's main port can move with the main slot - #190

Merged
7schmiede merged 5 commits into
mainfrom
docs/adr-0048
Oct 21, 2026
Merged

7schmiede merged 5 commits into
mainfrom
docs/adr-0048

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Proposal for part 2 of #184, for the project owner to decide. No code depends on it yet.

What it proposes

  • Opt-in per Compose service: [compose.<group>] main_ports = ["realmd", "mangosd"].
  • The main tree gets an overlay for those services: their TCP ports are published on an instance port Docker assigns, on loopback.
  • devstack holds the fixed port with a forward (tcpfwd::Front, as in ADR-0043). It listens on the address the Compose file names, so a bare 3724:3724 still answers on every interface for clients on the LAN. It holds connections while the container starts, forwards while it runs, and refuses while it is stopped.
  • promote --lane flips the forward to the lane's port: the Compose file's host port plus the lane's offset, either published locally or forwarded from the node. --lane main flips it back. moves_main_slot counts these services, so such a stack is no longer refused.
  • The main tree's container keeps running. Only clients on the host follow the lane.
  • TCP only. UDP ports stay with Docker; the check warns about them, and promote says which ports stayed.

Answers to the issue's open questions

  • Main container while a lane has the ports: it keeps running (point 5).
  • Opt-in or always: opt-in per service, because otherwise every database port would close while the daemon is down (point 1, alternatives).
  • UDP: out of scope (point 6).
  • Clients inside the Compose network: unaffected, which is intended.
  • status wording (point 3 of the issue): left out here; see "What this ADR does not say".

Costs

  • A named service's fixed port answers only while the daemon runs.
  • Windows Firewall may ask once, because devstack now binds the port instead of Docker.
  • Each connection gets one more forward on the host.

🤖 Generated with Claude Code

7schmiede and others added 3 commits October 21, 2026 18:24
…(Proposed)

Part 2 of #184. Opt-in per Compose service (`main_ports`): the main tree's
overlay publishes such a container on an instance port, devstack holds the
fixed port with a forward (ADR-0043's Front, on the Compose file's
address), and `promote --lane` flips it to the lane's port. The main
tree's container keeps running; TCP only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tly; no crosstalk

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7schmiede and others added 2 commits October 21, 2026 18:44
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede 7schmiede changed the title docs(adr): 0048, a container's main port can move with the main slot (Proposed) docs(adr): 0048, a container's main port can move with the main slot Oct 21, 2026
@7schmiede
7schmiede merged commit 8694c3b into main Oct 21, 2026
@7schmiede
7schmiede deleted the docs/adr-0048 branch October 21, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant