Repository navigation
2.2.14 - It runs in 192 MB, and the backup can leave sealed
Three days after 2.2.13, and most of it is about the machine underneath. The smallest box Quire Ink runs on went from 256 MB to 192 MB, and a blog of 1,000 posts in a 128 MB container stopped being killed for memory on two restarts out of three. The backup archive, which carries every credential the blog holds, can now leave the machine sealed. An upgrade copies your database before it changes it. And the four looks stop reading as one page in four costumes.
Upgrading: nothing to do. The first boot of this version finds a pending migration, writes a copy of your database to data/backups/ first, and exits with the reason if it cannot. On a blog that has been deploying often, that boot also hands back the space the old render cache held: measured on a real 618 MB database, 8 MB of writing and 502 MB of unreachable cache.
New feature:
It fits on a small machine (192 MB and any one CPU)
libvips does not hand memory back: six copies of one photograph climbed the server from 51 MB to 136 MB and left it there, which is what killed small installations two minutes after a boot that looked healthy.
- The image codec runs in a child process, one per picture size. At 192 MB a run that still hits the limit loses one encode, which is retried; the blog keeps serving. Before, the server died with nothing in the log to say why.
- AVIF is encoded at effort 3 rather than 4: 6.9 s against 28.5 s over twelve photographs, the same bytes, 0.24 dB of PSNR.
- The server runs
bun --smoleverywhere it is started. In a 128 MB container on an 8 GB host it held 121.5 MB and never finished warming; it holds 55 MB and warms in 379 ms. Throughput went up, not down: 5,962 against 4,995 requests a second. - The page cache is a budget,
PAGE_CACHE_MB, 8 MB by default. A blog of ordinary size cannot tell; 100 posts come to 2.4 MB. - The syntax highlighter is no longer loaded at boot, which every install paid 20.7 MB and 151 ms for, including blogs that never write code.
The backup archive can leave sealed (off until you turn it on)
The archive holds the mail password, the AI key, the Cloudflare token, the S3 pair, every two-factor secret and every subscriber's address, and it goes into somebody else's bucket and onto laptops. Nothing said so.
- Off at install and off on this upgrade: Settings, Server and connections, Backups. It cannot be switched on until there are keys to seal to.
- The server cannot open what it seals. The two keys are an identity shown once and a passphrase, and neither is stored on the box.
- Either key opens any archive. Lose both and nobody can open it; the card says so in a warning that stays even with explanations hidden.
- One switch covers the snapshots on disk, the off-site copy and the download.
bun scripts/backup-decrypt.tsopens one with nothing running, and it ships inside the image. - The ops script can seal too:
QUIRE_BACKUP_TO=blogseals to the same two keys, read from the blog itself, orQUIRE_BACKUP_AGE_TOforage.
An upgrade copies your database before it changes it (and gives the space back)
- A boot with a pending migration writes
data/backups/pre-<step>-<stamp>-quire.dbfirst, holding your writing and not the rebuildable caches. If it cannot, it exits and says which path and why. Two copies are kept. - When a migration leaves the file mostly empty, the boot compacts it once through a verified copy, never a
VACUUMover a live file. The 618 MB database above came back to 8.9 MB.
The four looks each read as their own kind of publication (for writers who picked one)
- Source code: every headline is set in the monospace, bold, while the paragraphs stay in the book face. Code blocks get line numbers that a copy does not pick up.
- Newspaper: the section menu sits in the masthead on every page, a strip you can swipe on a phone. The contents and the series parts each fit on one run of numbered entries, and the first letter is a drop cap. The first line of text moved up from y=980 to y=832 on a 1440 by 1000 screen.
- Notebook: dot-grid paper, links marked with a highlighter in your palette's accent, ragged right, and a square index card beside the piece.
- Settings, Appearance, Looks like shows the four as drawn tiles with a line saying who each is for.
A few improvements
- A picture in a post opens its full-size view with Enter or Space, and the library's full-size picture is a real dialog that takes focus and gives it back.
- The admin loads the pen's stylesheet only on the three writing screens: 55 KB down to 23 KB gzipped everywhere else.
- The ops backup script leaves the caches out of its snapshot, as the in-app backup already did.
- SQLite's page cache is 16 MB per connection instead of 64, which inside a 128 MB container is faster as well as smaller: 142 ms against 181 ms over 20,000 reads.
- A 404 from somebody's scanner is logged with its status, not filed as an error. One week of one live blog: 18,483 of those against twelve real failures.
- The writing list holds its lines to 80 characters; on a 13 inch laptop they had run to 140.
Fixed
- The render cache grew with every deploy: 502 MB of it on a 618 MB database, one post stored 204 times. A post keeps one cached body now.
- In the Notebook look the grey for dates, the rail and small labels was broken, so all of it printed in the full text colour and the hand-drawn series box never showed.
- Opening and saving a post closed up a spaced list, and split a list mixing bullets and checkboxes into two. Both now save as the list you wrote.
- A dollar or tilde you had escaped came back as maths, strikethrough or a code fence after a save.
- Excerpts, meta descriptions, social cards and feed summaries printed the backslashes a saved post carries.
- A sealed archive would have stopped opening the day its key-stretching cost was raised; the reader takes the cost from the archive now, within bounds.
- The Markdown view showed a long pasted piece as a stub, with everything past the box unreachable.
- The settings refusal line was drawn in the body colour instead of the danger colour.
What 2.2.14 does not do
- A sealed archive with both keys lost cannot be opened by anyone, this software included. The ops script seals the database only; uploads are copied as a tree, unsealed.
- The pre-upgrade copy is on the same disk as the database. It protects against a migration, not against losing the machine.
- At 192 MB an image encode can be killed and retried, so a new picture's smaller copies may arrive a few minutes late. Give it 256 MB.
- A look carries no colour of its own; the palette decides. The newspaper's section and figure numbers exist on the page only, not in the feed or a copied quote.
- A code block shows no file name or language label, and one holding a single blank line saves as empty.