Repository navigation
Run aiornot.vote on Bun instead of Node + pnpm (nixpacks) - #174
Merged
Merged
Conversation
- bun.lock migrated from pnpm-lock.yaml (every version kept), packageManager bun@1.4.0, workspaces in package.json, trustedDependencies in place of pnpm.onlyBuiltDependencies - .nixpacks/Dockerfile (the path dev2's compose builds) is now a hand-written oven/bun:1.4.0-slim image: production-only deps, USER bun, HEALTHCHECK. Same start sequence as before: migrate, seed:tags, seed:demo, the media daemon in the background, then `bun --bun next start` - db/worker CLIs run with bun directly instead of tsx - workspace-root lookup keys on bun.lock now that pnpm-workspace.yaml is gone - CI on Bun: typecheck, vitest (still the gate), the portable suite under bun test, build, boot under Bun and render pages + the OG image; bun audit Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The production image installs runtime deps only, and next start loads a .ts config through the typescript package; without it Next tries to npm install it at boot and the container exits. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ThreatCrush Security Scan11 finding(s) MEDIUM: 9 | LOW: 2
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the fleet Node -> Bun migration.
What changes
bun.lockmigrated frompnpm-lock.yamlwith the old lock still present, so every version is kept (all 519 pnpm entries match).packageManager: bun@1.4.0, workspaces moved into package.json,trustedDependenciesreplacespnpm.onlyBuiltDependencies..nixpacks/Dockerfile(the path dev2's compose builds) is now a hand-writtenoven/bun:1.4.0-slimimage. It has production deps only, runs asUSER bunwith every source COPY--chowned, and has a HEALTHCHECK. The start sequence is unchanged: migrate, seed:tags, seed:demo, the media daemon in the background, thenbun --bun next start. The nixpacks.nixandbuild.share removed.bun <file>.tsinstead of through tsx.next.config.ts->next.config.mjs:next startloads a.tsconfig throughtypescript, which is a devDependency the production image doesn't install. Without the rename, Next triesnpm install typescriptat boot and the container exits.file:DB and the.mediadefault) now looks forbun.lock, sincepnpm-workspace.yamlis gone. Prod setsDATABASE_URLandMEDIA_STORAGE_DIR, so the lookup doesn't affect it.vi.hoisted/vi.stubEnv/vi.stubGlobal), the portable 22 files / 127 tests underbun test, the build, then a boot under Bun that renders pages and the OG PNG. A non-blockingbun auditjob is added.Verified (image built from the commit, with group-only file modes like dev2's checkout)
/media/*,/_next/imagewebp + jpeg, GPTBot 402). Statuses and content match the live Node site. The OG PNG, media file and robots/llms.txt are byte-identical, and so is/_next/imageoutput size. The only text differences are the random tip and one media item the live daemon added mid-check.0000_init.sqlmigration, tag and demo seeds, and the daemon started under Bun. Signup, login and a wrong-password 401 work, which exercises argon2 under Bun. A sharp -> webp write to the media volume as uid 1000 is served back by/media. The container reachedhealthy, anddocker stoptook 0.6 s.777(dirs) /644(files, root), so uid 1000 can add new media.🤖 Generated with Claude Code