Commits
A commit is an immutable snapshot of your App’s/app directory stored in Git and backed up inside of Judt. You can restore a commit later if needed.
Create a commit
After you edit files or run commands in the sandbox, callPOST /api/apps/{id}/commits:
/app (respecting .gitignore), creates a Git commit, saves a durable backup, and returns a Commit object:
To list existing commits without starting the sandbox, call
GET /api/apps/{id}/commits.
Deployments
A deployment builds a commit in a clean container, runs any D1 database migrations, injects your App’s Secrets, and publishes the bundle to production.Create a deployment
CallPOST /api/apps/{id}/deployments:
- Deploy the sandbox: Send
{}to deploy the sandbox’s files. If they changed since the last commit, Judt commits them first and then deploys that commit. - Deploy a specific commit: Send
{"commit_id": "cmt_..."}to deploy that exact commit (for example, to roll back to an earlier version).
To write your own commit message, call
POST /api/apps/{id}/commits before you deploy.409 deployment_unsettled.
What happens during a deployment
When you create a deployment, Judt executes these steps in order:- Export the commit: Reads the commit snapshot from Git and verifies source limits (up to
2,048files and folders,32 MiBtotal uncompressed size, and1 MiBper file). - Validate
wrangler.json: Checks the App configuration and storage bindings. See The App contract and Configure wrangler.json. - Run
beforemigrations: If the App has existing D1 databases with pending schema migrations, applies them before the new code goes live. - Install dependencies and build: If
package.jsondeclares dependencies, requires apackage-lock.jsonfile (422 lockfile_missing) and runsnpm ci --ignore-scripts. Then runsnpm run build(when abuildscript is defined) inside an isolated build container. Secrets are not exposed during the build step. See npm packages and builds. - Inject Secrets and publish: Injects the App’s current Secrets into the deployed
varsconfiguration and publishes the bundle to the production runtime. - Verify activation: Probes the production runtime to confirm the new deployment starts cleanly.
- Run
aftermigrations: Applies initial D1 migrations for any newly created D1 databases.
The Deployment object
POST /api/apps/{id}/deployments waits for the pipeline to finish (up to 540 seconds) and returns the Deployment object:
Deployment status
Thestatus field says where the deployment is:
A deployment stays
succeeded after a newer deployment replaces it or the App is unpublished. To check which deployment is serving right now, inspect production.deployment_id on GET /api/apps/{id}.error.code and error.message explain why, and the previous production deployment continues serving if the failure happened before publication.
Unpublish an App
To take an App offline without deleting it, callPOST /api/apps/{id}/unpublish:
production.status to "unpublished" and production.deployment_id to null. The App’s source code, commits, Secrets, and runtime storage remain intact. Call POST /api/apps/{id}/deployments at any time to publish the App again.
Next steps
- Follow step-by-step procedures to publish, roll back, and unpublish in Publish and unpublish an App.
- Learn how D1 migrations and storage bindings behave across deployments in The App contract.