Repository navigation
A breaking release: shipwords now runs on Node, Postgres and Docker instead of Cloudflare Workers. There is no in-place upgrade from v0.2.0. Read "If you are on v0.2.0 or earlier" before pulling main.
Two production sites run this version: one moved on 2026-11-19 and tinydeskai.io on 2026-11-22, with their users, credits, orders and files carried over. The example site sites/tinydeskai-example is the same code.
What changed
| Part | v0.2.0 (Workers) | v0.3.0 |
|---|---|---|
| Process | Worker, wrangler deploy |
Docker container (start.mjs, srvx) behind a reverse proxy |
| Database | D1 (SQLite) | Postgres, one database and role per site |
| Money writes | D1 batches + optimistic lock | transactions + row locks; same ledger tables and idempotency keys |
| Jobs | Cloudflare Workflow | job_runs / job_steps in the site's database, run by the job worker |
| Files | R2 binding | the same R2 bucket through its S3 API |
| Video stitching | a compose container per job | one compose service per machine |
| Email, image descriptions | Workers bindings | the same Cloudflare products over REST; descriptions can also use the Vercel AI Gateway |
| Config | wrangler.jsonc vars + secrets |
.env read once at start |
Pages, site.config.ts, site.models.ts, src/models.server.ts and prices stay as they are. Cloudflare still does DNS, CDN, WAF, R2 and email.
Why
- Video sites need ffmpeg, and Workers can't run it. A Worker can't start a native program, and ffmpeg compiled to WebAssembly doesn't fit a video job into 128 MB of memory and the CPU time limit. So stitching and output checks ran in Cloudflare Containers.
- Containers can run up a bill quietly. A container is a Durable Object, and its
sleepAfteris not a stop guarantee (cloudflare/containers#242 and #264 are still open). On one live site, idle instances ran about 984 instance-hours before anyone noticed; left for a month, that is a bill of a few hundred dollars. - Workers saves ops, not money. It is a good fit for light sites. A media site pays per use for Containers, Workflows and D1, while a fixed-price server has a price cap. AI coding agents now do most of the server work, so the ops Workers saves no longer outweighs what it costs.
- D1 gets hard as a site grows. No interactive transactions and one writer per database: the credit ledger needed a version lock and a deliberate CHECK violation to roll a batch back. Postgres transactions and row locks say it directly.
There is one runtime, not two: the Workers code paths were deleted, not kept behind an adapter. More in architecture §1.
If you are on v0.2.0 or earlier
- Staying on Workers for now: pin to the
v0.2.0tag and don't pullmain.v0.2.0keeps working as it is but gets no more fixes, so plan the move. - A site with no users yet: recreating it from the current template with
pnpm new-siteis quicker than migrating it. Copy over your pages,DESIGN.md,messages/,site.config.ts,site.models.tsandsrc/models.server.ts. - A site with users, credits, orders or files: follow docs/migrating-from-workers.md.
tools/import-d1.mjsmoves a D1 export into Postgres, reads every row back and refuses rather than guesses; rehearse it once on a scratch database. The cutover takes a few minutes of downtime, and the R2 bucket, domain, payment webhooks and Google sign-in stay the same.
Questions go in Discussions.
Also in this release
- Sign-in codes are rate limited: per mailbox, per IP and site-wide for unregistered addresses, with disposable domains refused. The password reset routes are off.
- Yir SDK 0.15: a submit whose outcome is unknown is retried with the same idempotency key, so it can't be paid twice.
YIR_DEMOturns on Yir's demo mode for testing. - Image descriptions can use a vision model on the Vercel AI Gateway (
AI_GATEWAY_API_KEYand the site'seffect.describe.model); Workers AI over REST stays as the fallback. - The compose service has two lanes, so a stitch a visitor is waiting on never queues behind background job steps.
keepUploads: an optional private copy of a job's uploads, kept after the public upload links expire. Uploads are served uncached.- Repair passes replace one person per pass with the clip's soundtrack and cover-fit whole frames; likeness is scored on the face in each person's spot, and a swap is accepted only by a clear margin.
tools/import-d1.mjsrefuses a D1 export left where a Docker build could pick it up (inside a repository, unless under aprivate-assets/that.dockerignoreexcludes).