Skip to content

build: migrate workspace package manager to bun - #1

Open
agentHits wants to merge 5 commits into
AgentHits-Devfrom
chore/migrate-to-bun
Open

build: migrate workspace package manager to bun#1
agentHits wants to merge 5 commits into
AgentHits-Devfrom
chore/migrate-to-bun

Conversation

@agentHits

Copy link
Copy Markdown
Owner

What is this PR about?

Migrates the AgentHits Dokploy workspace from pnpm to Bun 1.3.14. This replaces pnpm-lock.yaml/pnpm-workspace.yaml with bun.lock, updates workspace scripts, CI workflows, devcontainer, docs, and Docker production packaging. Docker packaging no longer uses pnpm deploy --legacy; it uses bun install --production --frozen-lockfile --linker hoisted and copies the workspace server package into runtime images.

This PR targets AgentHits-Dev because chore/migrate-to-bun was branched from AgentHits-Dev. It is not ready as an upstream canary PR without first isolating the single clean change from AgentHits history.

Checklist

  • Dedicated branch created from AgentHits-Dev.
  • CONTRIBUTING.md checked and updated for Bun commands.
  • Local verification completed: bun install --frozen-lockfile, bun run typecheck, bun run format-and-lint, targeted env Vitest, full POSTGRES_PASSWORD=build-time-postgres-password bun run build, bun run server:script, pnpm/Corepack residue scan, and production-layout ESM resolution simulation.
  • Remote Docker image workflow validation is still running or pending.

Residual risk

Local Docker CLI is unavailable in the Codex environment, so real Docker image build/container smoke must be validated through GitHub Actions before merge or TimeWeb deployment.

Issues related (if applicable)

N/A

Screenshots (if applicable)

N/A

agentHits added 5 commits July 9, 2026 11:28
Что:
- Заменен pnpm workspace на Bun 1.3.14: добавлен bun.lock, packageManager/engines, workspaces и overrides перенесены в package.json.
- Обновлены package scripts, Dockerfiles, GitHub Actions и CONTRIBUTING.md под bun install/run/filter.
- Production Docker packaging переведен с pnpm deploy на bun production install с hoisted linker и явным копированием workspace server package.
Зачем:
- Упростить toolchain, ускорить install/script startup и проверить возможность отказаться от pnpm в AgentHits/Dokploy ветке.
Риски:
- Реальный docker build не запускался локально из-за отсутствующего Docker CLI; Docker path проверен через production-layout simulation и требует CI/image проверки перед merge/deploy.
Проверки:
- Команды и результаты: bun install --frozen-lockfile - passed; bun run typecheck - passed; bun run format-and-lint - exited 0 with existing Biome warnings/infos; bun run test -- --run __test__/env/shared.test.ts - 15 passed; POSTGRES_PASSWORD=build-time-postgres-password bun run build - passed; bun run server:script - restored source exports; git diff --check - passed; pnpm/Corepack residue scan in migration scope - no matches; temp production hoisted layout ESM resolution for @dokploy/server in dokploy/api/schedules - passed; independent reviewer re-check - pass.
- Ограничения: local Docker CLI unavailable, so real image build and container runtime smoke were not run.

What:
- Replaced the pnpm workspace with Bun 1.3.14: added bun.lock, packageManager/engines, workspaces, and moved overrides into package.json.
- Updated package scripts, Dockerfiles, GitHub Actions, and CONTRIBUTING.md to use bun install/run/filter.
- Replaced pnpm deploy production Docker packaging with bun production install using the hoisted linker and explicit workspace server package copying.
Why:
- Simplify the toolchain, speed up install/script startup, and verify whether the AgentHits/Dokploy branch can move away from pnpm.
Risks:
- A real docker build was not run locally because Docker CLI is unavailable; the Docker path was checked through production-layout simulation and still needs CI/image validation before merge/deploy.
Checks:
- Commands and results: bun install --frozen-lockfile - passed; bun run typecheck - passed; bun run format-and-lint - exited 0 with existing Biome warnings/infos; bun run test -- --run __test__/env/shared.test.ts - 15 passed; POSTGRES_PASSWORD=build-time-postgres-password bun run build - passed; bun run server:script - restored source exports; git diff --check - passed; pnpm/Corepack residue scan in migration scope - no matches; temp production hoisted layout ESM resolution for @dokploy/server in dokploy/api/schedules - passed; independent reviewer re-check - pass.
- Limitations: local Docker CLI unavailable, so real image build and container runtime smoke were not run.
Что:
- Добавлен GitHub Actions workflow для Docker build/smoke проверки Bun migration без публикации образов.
- Main, cloud, server и schedule images собираются с `push: false`; все загружаются локально на runner и проверяют Bun runtime плюс resolution `@dokploy/server`.
Зачем:
- Проверить Dockerfile/container path удаленно, потому что локально Docker CLI недоступен.
Риски:
- Workflow validation еще должен пройти на GitHub runner; TimeWeb deploy этим коммитом не запускается.
Проверки:
- Команды и результаты: ruby YAML parse - passed; git diff --check - passed; independent reviewer re-check - pass.
- Ограничения: actual Docker build/smoke будет выполнен после push через GitHub Actions.

What:
- Added a GitHub Actions workflow for Docker build/smoke validation of the Bun migration without publishing images.
- Main, cloud, server, and schedule images build with `push: false`; all are loaded locally on the runner and check Bun runtime plus `@dokploy/server` resolution.
Why:
- Validate the Dockerfile/container path remotely because Docker CLI is unavailable locally.
Risks:
- Workflow validation still needs to pass on GitHub runner; this commit does not deploy to TimeWeb.
Checks:
- Commands and results: ruby YAML parse - passed; git diff --check - passed; independent reviewer re-check - pass.
- Limitations: actual Docker build/smoke will run after push through GitHub Actions.
Что:
- Docker base stage теперь устанавливает Bun 1.3.14 внутри `node:24.4.0-slim` через официальный installer.
- Удалено копирование одиночного Bun binary из `oven/bun`, которое падало в GitHub Docker build с exit code 127.
Зачем:
- Разблокировать remote Docker build/smoke validation для Bun migration.
Риски:
- Build зависит от доступности `https://bun.sh/install`; версия Bun закреплена аргументом `bun-v1.3.14`.
Проверки:
- Команды и результаты: bun install --frozen-lockfile - passed; bun run typecheck - passed; git diff --cached --check - passed; independent reviewer - pass-with-risks without blockers.
- Ограничения: actual Docker build/smoke будет повторно выполнен через GitHub Actions после push.

What:
- Docker base stage now installs Bun 1.3.14 inside `node:24.4.0-slim` through the official installer.
- Removed single Bun binary copying from `oven/bun`, which failed in GitHub Docker build with exit code 127.
Why:
- Unblock remote Docker build/smoke validation for the Bun migration.
Risks:
- Build depends on `https://bun.sh/install` availability; Bun version is pinned with `bun-v1.3.14`.
Checks:
- Commands and results: bun install --frozen-lockfile - passed; bun run typecheck - passed; git diff --cached --check - passed; independent reviewer - pass-with-risks without blockers.
- Limitations: actual Docker build/smoke will be rerun through GitHub Actions after push.
Что:
- Добавлен глобальный `node-gyp@13.0.1` в Docker base stage для всех Bun images.
Зачем:
- `bun install` в remote Docker build запускает rebuild `node-pty`, который падает без `node-gyp` в PATH.
Риски:
- Дополнительная global npm dependency в Docker base; версия закреплена.
Проверки:
- Команды и результаты: npm view node-gyp version - 13.0.1; git diff --cached --check - passed.
- Ограничения: actual Docker build/smoke будет повторно выполнен через GitHub Actions после push.

What:
- Added global `node-gyp@13.0.1` to the Docker base stage for all Bun images.
Why:
- Remote Docker `bun install` runs `node-pty` rebuild, which fails without `node-gyp` in PATH.
Risks:
- Additional global npm dependency in Docker base; version is pinned.
Checks:
- Commands and results: npm view node-gyp version - 13.0.1; git diff --cached --check - passed.
- Limitations: actual Docker build/smoke will be rerun through GitHub Actions after push.
Что:
- Заменен ручной URL скачивания Railpack на официальный `https://railpack.com/install.sh` с pinned `RAILPACK_VERSION=0.15.4`.
Зачем:
- Main Docker image падал на Railpack asset URL с curl exit 22; официальный installer формирует корректный target name.
Риски:
- Build зависит от доступности railpack.com install script; версия Railpack остается закрепленной.
Проверки:
- Команды и результаты: curl https://railpack.com/install.sh - inspected installer options and target format; git diff --cached --check - passed; GitHub run 29006656345: cloud/server/schedule build+smoke passed, main failed only on old Railpack URL.
- Ограничения: main image build/smoke будет повторно выполнен через GitHub Actions после push.

What:
- Replaced the manual Railpack download URL with the official `https://railpack.com/install.sh` and pinned `RAILPACK_VERSION=0.15.4`.
Why:
- Main Docker image failed on the Railpack asset URL with curl exit 22; the official installer builds the correct target name.
Risks:
- Build depends on railpack.com install script availability; Railpack version remains pinned.
Checks:
- Commands and results: curl https://railpack.com/install.sh - inspected installer options and target format; git diff --cached --check - passed; GitHub run 29006656345: cloud/server/schedule build+smoke passed, main failed only on old Railpack URL.
- Limitations: main image build/smoke will be rerun through GitHub Actions after push.
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