Repository navigation
Run on Bun: bun install, bun --bun next, standalone server under Bun - #2
Merged
Merged
Conversation
Part of the fleet Node -> Bun migration, following the phonenumbers.bot pilot. - Package manager: bun.lock replaces pnpm-lock.yaml; packageManager bun@1.4.0. The engines.node >=24 pin is dropped: nothing runs on Node any more. - Runtime: scripts use `bun --bun next`, so Next builds and serves on Bun. `bun test` runs the existing node:test suites unchanged (9 pass). - next.config: output standalone with the tracing root pinned to this directory, and the Geist font the OG/Twitter cards read from node_modules at request time named in outputFileTracingIncludes so standalone ships it. - Image: .nixpacks/Dockerfile (the path dev2's compose stack builds) is now a hand-written oven/bun:1.4.0-slim multi-stage build running `bun server.js` as the non-root bun user. The nixpacks .nix and build.sh are gone. Port 3000, env and the /healthz health path are unchanged. - CI: setup-bun, frozen install, test, typecheck, build, boot the standalone server under Bun. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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. This applies the recipe from the phonenumbers.bot pilot (profullstack/phonenumbers.bot#12).
Changes
bun.lockreplacespnpm-lock.yaml, andpackageManageris nowbun@1.4.0. I dropped theengines.node >=24pin.bun --bun next.bun test src/libruns the existingnode:testsuites unchanged, and all 9 pass.output: "standalone"and pinsoutputFileTracingRoot. The OG and Twitter cards read the Geist font fromnode_modulesat request time, so it is listed inoutputFileTracingIncludes. Without that entry, the standalone build would silently fall back to the default font..nixpacks/Dockerfileis the path dev2's compose stack builds. It is now a hand-writtenoven/bun:1.4.0-slimmulti-stage build that runsbun server.jsas the non-rootbunuser. The HEALTHCHECK probes/healthzon 127.0.0.1. I removed the nixpacks.nixandbuild.sh. Port 3000, the env vars and/healthzare unchanged, and the compose stack passes no build args.Verified locally
I built the image from
git archive HEADthrough a compose file shaped like dev2's (same dockerfile path, env block, 1 GiB limit and port map)./healthz,/robots.txt,/sitemap.xml,/opengraph-imageand/twitter-imageare byte-identical to the live Node site./and/privacyhave the same content. Their bytes differ only in module ids and RSC chunking, and/varies anyway because of the A/B hero./_next/imagereturns 200.docker topshowsbun server.js. The container is healthy, used about 114 MiB, and stops on SIGTERM in 1.8 s.🤖 Generated with Claude Code