From 18c8101084c595fa1f27984e531556b626ac6e3d Mon Sep 17 00:00:00 2001 From: Shivam Sharma <91240327+shivamhwp@users.noreply.github.com> Date: Wed, 5 Aug 2026 08:40:59 +0530 Subject: [PATCH] feat(infra): run Render demo on free instance --- .../settings/CloudEnvironmentsSettings.tsx | 19 ++++++++---- docs/user/render.md | 30 +++++++++---------- render.yaml | 6 +--- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/apps/web/src/components/settings/CloudEnvironmentsSettings.tsx b/apps/web/src/components/settings/CloudEnvironmentsSettings.tsx index 34977f1302..64fa54626a 100644 --- a/apps/web/src/components/settings/CloudEnvironmentsSettings.tsx +++ b/apps/web/src/components/settings/CloudEnvironmentsSettings.tsx @@ -188,7 +188,7 @@ export function CloudEnvironmentsSettings() { > - +
- - - } /> + + + ); diff --git a/docs/user/render.md b/docs/user/render.md index 74244f9ea7..476bdafae1 100644 --- a/docs/user/render.md +++ b/docs/user/render.md @@ -4,15 +4,16 @@ This experimental setup runs one T3 Code environment as a Render web service. Th the provider processes, repositories, worktrees, terminals, and T3 Code state. The web, desktop, and mobile clients connect to it over Render's public HTTPS and WebSocket endpoint. -This is a demo environment, not a multi-tenant hosted service. The attached persistent disk limits -the service to one instance. Multiple agent threads can still run concurrently inside that instance. +This is an ephemeral, one-session demo environment, not a multi-tenant hosted service. The Free +instance can run multiple agent threads, but loses its files and authentication when it restarts or +spins down. ## What the Blueprint Creates The root [`render.yaml`](../../render.yaml) creates: - a Docker web service containing T3 Code, Codex, Claude Code, Git, and the GitHub CLI; -- a persistent disk mounted at `/data` for T3 Code state, provider credentials, and workspaces; +- an ephemeral `/data` workspace for T3 Code state, provider credentials, and repositories; - a health check against T3 Code's public environment descriptor. ## Deploy @@ -23,17 +24,17 @@ The root [`render.yaml`](../../render.yaml) creates: 4. Open the service logs and copy the `Pair URL` printed during startup. Treat this URL like a password: it contains a one-time pairing credential. 5. Open the URL in a browser, or paste it under **Settings → Cloud environments → Pair URL**. -6. Authenticate Codex as described below. -7. Open the Command Palette and choose **Add Project → Cloud environments → Render cloud +6. Open the Command Palette and choose **Add Project → Cloud environments → Render cloud environment**. Paste a public GitHub URL. T3 Code clones it directly into the Render workspace; there is no local destination picker. +7. Open the project terminal, run `codex login --device-auth`, complete the device login, and start + an agent. Repositories are selected after pairing rather than baked into the Blueprint. Each clone is stored -under `/data/workspace` and survives deploys. This keeps the public deployment configuration generic -and lets each user bring repositories they already have access to. +under `/data/workspace` for the current Free-instance session. The Render service advertises cloud metadata in its normal T3 environment descriptor. That is what -lets clients present it as a cloud device and automatically route project cloning to its persistent +lets clients present it as a cloud device and automatically route project cloning to its cloud workspace while leaving the existing local-device folder flow unchanged. The demo Blueprint is pinned to `feat/render-cloud-environment` so it can deploy before the draft @@ -41,16 +42,15 @@ pull request is merged. Update the `branch` field in `render.yaml` if you rename ## Provider Authentication -The Blueprint does not ask for an OpenAI API key. To use a ChatGPT subscription, open a Render Shell -and run: +The Blueprint does not ask for an OpenAI API key. Free instances do not include Render Shell access, +so clone a public project, open its T3 Code terminal, and run: ```sh codex login --device-auth ``` -Follow the printed link and enter the device code. `CODEX_HOME` points at the persistent disk, so the -provider session survives service restarts. Claude Code is installed too; use its normal subscription -login flow from a Render Shell. `CLAUDE_CONFIG_DIR` is persisted as well. +Follow the printed link and enter the device code. The login lasts for the current Free-instance +session and is lost if Render restarts or spins down the service. ## T3 Connect @@ -63,7 +63,7 @@ machines that need its managed tunnel or account-level environment discovery. - Each deploy prints a fresh pairing URL with a 24-hour lifetime. Existing paired browser sessions remain authenticated until revoked with `t3 auth`. -- Render terminates the previous instance before starting a new one because the service has a disk. - Expect a short interruption during deploys. +- Render spins a Free web service down after 15 minutes without inbound HTTP or WebSocket traffic. + A later request starts a fresh instance, so pair, clone, and authenticate again. - Do not use this Blueprint for untrusted users or repositories. Coding agents can execute commands and access every secret available to the service. diff --git a/render.yaml b/render.yaml index f4918b8ee4..2ddd9e26eb 100644 --- a/render.yaml +++ b/render.yaml @@ -2,17 +2,13 @@ services: - type: web name: t3code-cloud-demo runtime: docker - plan: starter + plan: free repo: https://github.com/pingdotgg/t3code.git branch: feat/render-cloud-environment autoDeployTrigger: commit dockerfilePath: ./infra/render/Dockerfile dockerContext: . healthCheckPath: /.well-known/t3/environment - disk: - name: t3code-data - mountPath: /data - sizeGB: 10 envVars: - key: T3CODE_CLOUD_PROVIDER value: render