feat(infra): run Render demo on free instance

This commit is contained in:
Shivam Sharma committed 2026-08-05 08:40:59 +05:30
1 parent d1784e4212
commit 18c8101084
3 files changed
+29 -26

No files matched your search

@@ -188,7 +188,7 @@ export function CloudEnvironmentsSettings() {
>
<SettingsRow
title="Powered by Render"
description="Persistent cloud agents and repositories."
description="Creates a temporary free cloud machine for the demo."
control={
<Button
size="sm"
@@ -202,7 +202,10 @@ export function CloudEnvironmentsSettings() {
</SettingsSection>
<SettingsSection title="Connect">
<SettingsRow title="Pair URL" description="Paste the Pair URL printed in the Render logs.">
<SettingsRow
title="Pair URL"
description="Connects this T3 Code client to the cloud machine. Copy the URL from the Render logs."
>
<div className="mt-3 flex flex-col gap-2 sm:flex-row">
<Input
value={pairUrl}
@@ -234,12 +237,9 @@ export function CloudEnvironmentsSettings() {
</SettingsSection>
<SettingsSection title="Ready to use">
<SettingsRow title="Authenticate Codex" description="Run once in the Render Shell.">
<CopyCommand command={CODEX_LOGIN_COMMAND} />
</SettingsRow>
<SettingsRow
title="Get the code"
description="Choose the Render environment and paste any public GitHub URL. It clones directly into the cloud workspace."
description="Choose Render and paste a public GitHub URL. The repository is cloned inside the cloud machine."
control={
<Button
size="sm"
@@ -250,6 +250,13 @@ export function CloudEnvironmentsSettings() {
</Button>
}
/>
<SettingsRow
title="Authenticate Codex"
description="After cloning, open that project's terminal and run this once. Then start an agent."
status="Free instances forget this login when they restart or spin down."
>
<CopyCommand command={CODEX_LOGIN_COMMAND} />
</SettingsRow>
</SettingsSection>
</SettingsPageContainer>
);
+15 -15
View File
@@ -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.
+1 -5
View File
@@ -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