Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Durable Object-managed Containers demo

A minimal Worker whose Durable Objects start namespace-backed containers on demand.

Prerequisites

  • Node.js, pnpm, and Docker
  • A Cloudflare account with Workers, Containers, and the new runtime enabled.

Deploy

Install dependencies:

pnpm install

Authenticate, then deploy with the main preview build:

npx wrangler@4.131.0 whoami
npx wrangler@4.131.0 deploy

Wrangler builds and pushes the image, prepares it to run on Cloudflare, uploads the Worker, and creates the namespace-backed application.

Try it

Use the Worker URL printed by Wrangler:

curl "https://<worker-url>/?instance=first"
curl "https://<worker-url>/_status?instance=first"
curl "https://<worker-url>/_destroy?instance=first"

Each instance value selects a different Durable Object and container.

What changed

  • scheduling_policy: "durable_object" makes each Durable Object own its container lifecycle.
  • The named images.app configuration tells Wrangler to build, push, and prepare the image.
  • Rollouts work alongside worker's gradual rollouts.

About

alpha

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages