Skip to content

build(web): run diskpush.com under Bun on dev2 - #51

Merged
ralyodio merged 1 commit into
mainfrom
bun-runtime-web
Oct 1, 2026
Merged

ralyodio merged 1 commit into
mainfrom
bun-runtime-web

Conversation

@ralyodio

@ralyodio ralyodio commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Part of the fleet Node to Bun migration. Only the runtime of the dev2 site container changes; the CLI, desktop app and their pnpm release are untouched.

Before: .nixpacks/Dockerfile was the generated nixpacks Ubuntu+Nix image running pnpm --filter @diskpush/web start (next start on Node 24), 1.87 GB.

After: a hand-written image at the same path dev2's compose builds.

  • Build stage: node:24-slim + pnpm 11.18.0, pnpm install --frozen-lockfile --filter @diskpush/web... and pnpm --filter @diskpush/web build, same as before. git is installed because app/sitemap.ts reads lastmod dates from git log, and .dockerignore keeps .git for the same reason.
  • Runtime: Next's standalone server under oven/bun:1.4.0-slim as uid 1000, CMD ["bun", "apps/web/server.js"], with a HEALTHCHECK. No Node in the final image. 332 MB.
  • next.config.mjs: output: 'standalone', with outputFileTracingRoot at the repo root so the existing docs/**/*.md and scripts/install.sh includes land at the ../../ path that lib/docs.ts and /install.sh read from.
  • Removed nixpacks.toml, .nixpacks/build.sh and the .nix pin.
  • CI: a new web-bun job builds the site, boots it under Bun and checks the pages, the installer, a 404 and the crawl gateway's 402.

The monorepo stays on pnpm (no lockfile or packageManager change), because the CLI and desktop releases are built and published with it.

Verified from the commit (clean clone with the o bits stripped, the way dev2 checks out, built through a compose file shaped like dev2's with the real app.env): 32 URLs compared against the live site. Statuses all match. Static assets, /install.sh, /llms.txt, /robots.txt, /sitemap.xml (same git dates) and the security/openaccess files are byte-identical. Page text is identical, except /download and /api/releases/latest, where live shows no release because dev2's IP has spent GitHub's 60/h unauthenticated limit (already the case, see below). GPTBot gets 402. Health reached healthy, docker stop took 0.8 s, about 93 MiB / 15 pids at idle, logs clean.

Pre-existing, not changed here: on dev2 api.github.com/rate_limit shows core remaining 0, so diskpush.com/download says "Not yet published" while v0.12.5 is out. app.env has no GITHUB_TOKEN, though lib/releases.ts supports one.

🤖 Generated with Claude Code

The dev2 image was the nixpacks Ubuntu+Nix image running `pnpm --filter
@diskpush/web start` (next start) on Node. It is now hand-written at the
same path compose builds (.nixpacks/Dockerfile): the build stage is
unchanged in substance (Node 24 + pnpm 11.18.0, web-only install from
pnpm-lock.yaml, git present for the sitemap's lastmod dates), and the
runtime is Next's standalone server under oven/bun:1.4.0-slim as uid
1000, with no Node in the final image.

The monorepo stays on pnpm: the CLI and desktop releases are built and
published with it, so no lockfile or packageManager change.

- next.config: output standalone, tracing root at the repo root so the
  docs/ and scripts/install.sh includes land at the ../../ path the
  pages read from.
- Remove nixpacks.toml, .nixpacks/build.sh and the .nix pin.
- .dockerignore (keeps .git; the sitemap needs it).
- CI: a web-bun job builds the site, boots it under Bun and checks the
  pages, the installer, a 404 and the crawl gateway's 402.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 7a1b771 into main Oct 1, 2026
5 checks passed
@ralyodio
ralyodio deleted the bun-runtime-web branch October 1, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant