chore(dev): route the dev stack through a shared Traefik instead of OrbStack - #52
Merged
Merged
Conversation
…rbStack The dev stack reached the browser through OrbStack's proxy, which Docker Desktop does not have. Services now carry Traefik labels and join the external devproxy network; scripts/dev.ts reuses a running proxy on that network or starts docker-compose.proxy.yml. Hosts become http://<svc>.<slug>.freenary.localhost. docker-compose.yml is unchanged. Signed-off-by: suiramdev <me@suiram.dev>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 development stack now reaches the browser through Traefik instead of OrbStack's built-in proxy. Each worktree is served at
http://<service>.<slug>.freenary.localhost. Look atscripts/dev.ts › ensureProxyfirst, then at the labels and network aliases indocker-compose.dev.yml.Motivation
dev:uponly gave a browsable stack under OrbStack. Docker Desktop, which another project on the same machine needs, has no equivalent.devproxynetwork, can serve every worktree and other projects that already share that network. No second proxy fights for the port.*.localhostneeds no local CA. Chrome and Firefox treat it as a secure context.Drawbacks
devproxy.*.localhostas a secure context.dev.tscreates it, but a baredocker compose -f docker-compose.dev.yml upfails when the network is missing.Prior art
dev.orbstack.domainslabels. They were removed because they are runtime-specific.web-<slug>.localhost) were rejected, becauseresolveCookiePolicyrefuses a one-label cookie parent.Notes
scripts/dev-identity.test.tsnow asserts the http andfreenary.localhosthost shapes.contributing/local-stack,contributing/index,contributing/writing-docs, and the generatedself-hosting/configurationdev table.revieweragent approved with no findings after two rounds. It found that bareserverandmailpitnames resolve across worktrees ondevproxy, so the stack now uses the default-network aliasesfreenary-serverandfreenary-mailpit. It also found that the network must use the172.30.0.0/16subnet the sibling proxy expects.docker-compose.ymlis untouched. There is no migration and no breaking change for operators.