Skip to content

Commit

g1t.page runs Docker deployments, behind a switch that is off until Cloudflare's container APIs are checked against g1t's account (`CONTAINERS` in the deployments service). Each container app is a Worker of g1t's own in the same Workers for Platforms namespace, so the dispatcher, custom domains, previews and take-downs reach it by name as any app: its `G1tApp` Durable Object holds a Container application (default scheduling policy, one instance, the project's **Container size**, `lite` unless chosen), starts it on the first request with the project's secrets and variables and `PORT` as its environment, waits up to 90 seconds for it to answer on its port, proxies to it, and stops it five minutes after the last request; it charges each minute awake ahead and the bytes it sends, and reports them with a token of its own to `POST /deployments/apps/<app>/meter`, which the API forwards. A build's new `registry` step gets a registry login g1t mints push-only for 15 minutes, with its app's own repository named; g1t runs only an image by digest in that repository, checked with the registry, and never hands a build a login that can pull. Container time is metered at Cloudflare's Containers price plus the margin through new price book meters (vCPU charged as busy while awake, and egress at the most a GB costs anywhere, so g1t never sells below cost), noted for the spend limit as it runs and charged with the month's Deployments line; a paused workspace's container apps stop and start no more. Settings, Deployments gets Build as (Auto, Static site, Workers, Docker), Dockerfile and Container size with each size's price an hour, and says what the last build found with what it was built with ("Static site · Astro", "Container · Dockerfile"), now that the finish report's `framework` is stored. Deploy sandboxes get Docker, `BUILD_AS` and `DOCKERFILE`, and reach `registry.cloudflare.com`; `start_deployment_build` answers `build_as` and `dockerfile` for `g1t/deploy`, which takes them as inputs, as `g1t/detect` does. The Deployments guide has Docker deployments, their prices and how they work with the evidence for it, the limitations page says what is left, and Deploy g1t to Cloudflare lists each live check to make before switching it on.

Claude-Session:
https://claude.ai/code/session_01PnwTRSNaC7vEHTAuBzjhrn
Claudeagent and Claudeagentcommitted Parentddf1caaBrowse files
3 files+14−00/3 viewed
+2−0
4141 | `root-dir` | The project's setting | Where the project is in the checkout. |
4242 | `build-command` | The project's setting, else what the build finds | What builds it. |
4343 | `output-dir` | The project's setting, else the folder the framework writes, else the first of `dist`, `build`, `out`, `public`, `_site`, `.output/public` | The folder a static build writes. |
44+| `build-as` | The project's setting, else `auto` | What it is built as: `auto`, `static`, `workers` or `docker`. A container is built with the `docker` on the job's `PATH`. |
45+| `dockerfile` | The project's setting, else `Dockerfile` or `Containerfile` | The Dockerfile a container is built from, relative to the project. |
4446 | `sha` | The run's commit | The commit this is a build of, for its `g1t / deploy` check. |
4547 | `token` | `${{ github.token }}` | The job's own token. It needs `deployments: write`; any other token is refused. |
4648
+10−0
1919 description: The folder a static build writes. The project's own setting, else the folder the framework writes, else the first of dist, build, out, public, _site or .output/public.
2020 required: false
2121 default: ""
22+ build-as:
23+ description: What it is built as, auto, static, workers or docker. The project's own setting unless you say; auto finds it from the project's files.
24+ required: false
25+ default: ""
26+ dockerfile:
27+ description: The Dockerfile a container is built from, relative to the project. The project's setting, else Dockerfile or Containerfile.
28+ required: false
29+ default: ""
2230 sha:
2331 description: The commit this is a build of, for the commit's g1t / deploy check. The run's commit unless you say.
2432 required: false
4957 INPUT_ROOT_DIR: ${{ inputs.root-dir }}
5058 INPUT_BUILD_COMMAND: ${{ inputs.build-command }}
5159 INPUT_OUTPUT_DIR: ${{ inputs.output-dir }}
60+ INPUT_BUILD_AS: ${{ inputs.build-as }}
61+ INPUT_DOCKERFILE: ${{ inputs.dockerfile }}
5262 INPUT_SHA: ${{ inputs.sha }}
5363 INPUT_TOKEN: ${{ inputs.token }}
5464 run: bash "$GITHUB_ACTION_PATH/deploy.sh"
+2−0
9393 export ROOT_DIR="$(pick "${INPUT_ROOT_DIR:-}" root_dir)"
9494 export BUILD_COMMAND="$(pick "${INPUT_BUILD_COMMAND:-}" build_command)"
9595 export OUTPUT_DIR="$(pick "${INPUT_OUTPUT_DIR:-}" output_dir)"
96+export BUILD_AS="$(pick "${INPUT_BUILD_AS:-}" build_as)"
97+export DOCKERFILE="$(pick "${INPUT_DOCKERFILE:-}" dockerfile)"
9698 export BUILD_ENV="$(field build_env <<<"${answer}")"
9799 export BUILD_SECRETS="$(field build_secrets <<<"${answer}")"
98100 unset GIT_REMOTE