Skip to content

2.2.17 - Quire Ink runs on Cloudflare, from a button or your own admin

Choose a tag to compare

@joiha-steven joiha-steven released this 03 Oct 14:55

Three days after 2.2.16, and the biggest change since the rewrite: Quire Ink runs on Cloudflare (beta, Workers Paid only), from a button for a new blog or from Settings for one that already runs on a server. Upgrading is the usual pull and restart, and migration 022 runs by itself. If you run docker-compose.yml or docker-compose.caddy.yml from a checkout, run docker compose pull before your next up: they now run the published image instead of building whatever was last pushed.

New feature:

Quire Ink on Cloudflare (beta, the same blog without a server)

Every page of the demo compared byte for byte with the server's (105 of 105), the whole browser tour run against it, and a backup taken there restored to what the server had.

  • Deploy to Cloudflare: one button creates the Worker, its database and its storage in your account, asks for a setup code, and installs the newest release.
  • Move a blog you already run from Settings, Server, Run on Cloudflare: it checks your token and plan, creates everything, and loads a backup of itself in 16 MB parts, at any size. A blog with 66 MB of uploads moved in 71 seconds. The old one keeps serving until you point the domain.
  • Update with one key from Settings: new code in, variables and secrets kept, and the old version put back if the new one does not answer as itself. A button blog updates from its copy on GitHub.
  • What it costs, from the blog's own numbers: $5.00 a month for 100,000 views, about $5.15 for a million.
  • Leave from the same card: take a backup, then delete the blog from Cloudflare.

Start a new blog from a backup (how a blog moves now)

  • A fresh install offers Start from a backup on its first screen: every post, setting, subscriber and picture goes in, and the owner signs in as before.
  • Any size: past 48 MB the archive goes in 16 MB parts, resumes after a dropped connection, and the same door is an HTTP API for a program.
  • The backup is now rows, with every table's count and hash in a manifest, so a restore proves nothing was lost. Older archives still restore.
  • Restoring is one command, bun scripts/restore.ts, and the image carries it.

Installing runs a release (and upgrading goes back by itself)

  • install.sh installs the newest release instead of main.
  • bun run upgrade moves a source install to a new release and returns to the old one if anything fails.
  • server.sh takes a blank Ubuntu or Debian server to a running blog with HTTPS in one command.
  • /api/health names the version and whether it is the source, the image or Cloudflare.

A few improvements

  • The 365-day analytics screen no longer freezes the blog: on a million recorded views the front page waited up to 12 seconds while it loaded, and now waits at most a tenth of a second. The screen loads in under four seconds, and instantly within a minute.
  • A highlighted post carries only the pen strokes it uses: the demo's first visits fell from 1,084 KB to 344 KB.
  • The admin's pages are a quarter to a third smaller (Settings 881 KB to 571 KB), with nothing on screen moved.
  • An install from source is 91 MB instead of 325 MB.
  • An import ZIP is read a slice at a time.
  • New passwords are hashed at 19 MiB, and an old one is brought up to date at the next sign-in.

Fixed

  • A favicon, app icon or author portrait could not be uploaded, and a removed one could not be deleted (#69).
  • A newsletter cut off by a restart stopped silently, and resending it would have mailed the first half twice. It now carries on from the database and mails nobody twice.
  • The restore command ran an archive's own SQL as it found it, so a tampered archive could write a file anywhere on the machine. It now runs only table definitions, and oversized parts of an archive are refused before anything is allocated.
  • A claim and a backup load could both go into the same empty blog.
  • The colour fields in Settings showed no focus ring.
  • A backup taken while a picture's smaller copies were being written failed with a 500.

What 2.2.17 does not do

  • Cloudflare is beta and Workers Paid only. There an upload is 25 MB and an import 30 MB by default, the database lives in one region, and an operator's CSP does not reach the fonts, scripts and stylesheets Cloudflare serves itself.
  • A backup loads only into an empty blog of the same version; restoring over content is still the command line.
  • Move to Cloudflare needs disk room for one backup, and a button blog updates and leaves through GitHub and the Cloudflare dashboard, not from Settings.
  • A newsletter interrupted by a restart may miss the one address being sent at that moment, rather than risk mailing it twice.