feat(server): add headless Docker image - #4911
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4caec2c062
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ApprovabilityVerdict: Needs human review This PR adds new Docker deployment capability and changes the auto-bootstrap configuration precedence to allow explicit opt-in during headless mode. New features with runtime behavior changes warrant human review. There's also an unresolved comment about Docker networking causing unreachable pairing URLs. You can customize Macroscope's approvability policy. Learn more. |
4caec2c to
ebc1486
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ebc1486. Configure here.
| VOLUME ["/data", "/workspace"] | ||
|
|
||
| ENTRYPOINT ["/usr/bin/tini", "--"] | ||
| CMD ["t3", "serve", "--auto-bootstrap-project-from-cwd", "--host", "0.0.0.0", "--port", "3773", "/workspace"] |
There was a problem hiding this comment.
Unreachable Docker pairing URLs
Medium Severity
The image runs t3 serve with --host 0.0.0.0, so headless pairing advertises the container bridge IP from resolveHeadlessConnectionHost. With the documented -p 3773:3773 publish path, that URL and QR code are not reachable from the host (especially Docker Desktop) or other devices, while bind host and advertised host remain the same setting, so T3CODE_HOST cannot fix it without replacing the full CMD.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ebc1486. Configure here.


Problem
Running the published T3 server in a fresh container requires downloading the package and compiling native dependencies at startup. Keeping that compiler toolchain in the runtime image also makes a headless deployment larger and less predictable.
Solution
/workspacepath.Impact
Users can build a repeatable headless T3 server image that starts without an npm download and opens with the mounted workspace ready as a project. Provider CLIs and credentials remain an explicit deployment choice rather than being baked into the base image.
Validation
vp test run apps/server/src/cli/config.test.tsvp test run apps/server/src/serverRuntimeStartup.test.tsvp run t3#typecheckvp lint apps/server/src/cli/config.ts apps/server/src/cli/server.ts apps/server/src/cli/config.test.tsvp fmt --check apps/server/src/cli/config.ts apps/server/src/cli/server.ts apps/server/src/cli/config.test.ts docs/user/remote-access.mddocker build --check --build-arg T3_VERSION=0.0.33 .docker build --build-arg T3_VERSION=0.0.33 --tag t3-pr4911-review:local .Built with GPT-5.6 using the Codex harness in T3 Code.
Note
Add headless Docker image for the T3 server
/dataand/workspace.autoBootstrapProjectFromCwdprecedence in headless mode: flags and environment variables can now opt in to auto-bootstrap rather than being hard-disabled by thet3 servecommand.Macroscope summarized ebc1486.
Note
Low Risk
Packaging and CLI precedence changes with tests; no auth or data-model changes; Docker runs as non-root with documented volume/permission caveats.
Overview
Adds a multi-stage Dockerfile that installs the published
t3npm package at build time (T3_VERSIONbuild arg, defaultlatest), keeps build tooling out of the runtime image, and runst3 serveas the non-rootnodeuser on0.0.0.0:3773with--auto-bootstrap-project-from-cwd,/dataand/workspacevolumes, Git/SSH, andtini.Headless CLI behavior no longer hard-disables auto-bootstrap via
forceAutoBootstrapProjectFromCwd.t3 servestill defaults auto-bootstrap off in headless mode, but an explicit flag or env can opt in—matching what the Docker image needs to register the mounted workspace on first start.Documents build/run, persistence, UID
1000:1000, and provider CLI expectations in the remote-access guide.Reviewed by Cursor Bugbot for commit ebc1486. Bugbot is set up for automated code reviews on this repo. Configure here.