chore(ops): build with bun and ship v2's .output/standalone

v2 replaces pnpm with bun and moves the standalone build to
apps/nextjs/.output/standalone, which already carries static assets,
public and next.config.ts. Next still writes an incomplete
.next/standalone, so the assembler now refuses to run without the v2
output rather than silently shipping that one.

The notes now list v2's registration points, the tests that already
fail on the upstream tag, and the one-way v1 to v2 database migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
zacharyandClaude Opus 5.5 committed 2026-10-08 00:49:44 +02:00
1 parent dd5a3c83a8
commit 95df5af7cf
3 files changed
+71 -29

No files matched your search

+11 -11
View File
@@ -3,7 +3,7 @@
# Assemble l'arborescence d'exécution à partir d'un dépôt déjà construit.
#
# Le dépôt et l'instance qui tourne n'ont PAS la même forme : le clone contient
# des sources et un `apps/nextjs/.next/standalone` ; l'instance attend
# des sources et un `apps/nextjs/.output/standalone` ; l'instance attend
# `apps/nextjs/server.js`, `db/migrations/`, `build/better_sqlite3.node` à sa
# racine. Ce script fait la conversion — les mêmes COPY que le stage `runner`
# du Dockerfile officiel, d'où vient la disposition de /opt/homarr.
@@ -11,7 +11,7 @@
# Usage : ops/assemble-standalone.sh <destination>
#
# Construire d'abord :
# pnpm turbo build --filter=@homarr/nextjs... --filter=@homarr/cli
# bun run turbo run build --filter=@homarr/nextjs... --filter=@homarr/cli
#
set -euo pipefail
@@ -20,20 +20,20 @@ REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$REPO"
[ -d apps/nextjs/.next/standalone ] || {
echo "apps/nextjs/.next/standalone absent — construis d'abord :" >&2
echo " pnpm turbo build --filter=@homarr/nextjs... --filter=@homarr/cli" >&2
# Depuis la v2, la sortie est .output/standalone. Next écrit encore un
# .next/standalone intermédiaire, incomplet : ne jamais le prendre à la place.
[ -f apps/nextjs/.output/standalone/apps/nextjs/server.js ] || {
echo "apps/nextjs/.output/standalone absent — construis d'abord :" >&2
echo " bun run turbo run build --filter=@homarr/nextjs... --filter=@homarr/cli" >&2
exit 1
}
mkdir -p "$DEST"
# L'ordre suit le Dockerfile : le standalone d'abord, le reste par-dessus.
cp -a apps/nextjs/.next/standalone/. "$DEST/"
mkdir -p "$DEST/apps/nextjs/.next"
cp -a apps/nextjs/.next/static "$DEST/apps/nextjs/.next/static"
cp -a apps/nextjs/public "$DEST/apps/nextjs/public"
cp -a apps/nextjs/next.config.ts apps/nextjs/package.json pnpm-workspace.yaml "$DEST/"
# L'ordre suit le Dockerfile : le standalone d'abord, le reste par-dessus. En v2,
# le standalone embarque déjà .next/static, public, next.config.ts et
# package.json — le Dockerfile ne les copie plus à part.
cp -a apps/nextjs/.output/standalone/. "$DEST/"
mkdir -p "$DEST/apps/cli"
cp -a packages/cli/cli.cjs "$DEST/apps/cli/cli.cjs"