feat: switch foundry backend from Bun to Node.js

- Replace Bun.serve() with @hono/node-server (already a dependency)
- Replace Bun-specific debug APIs (Bun.gc, Bun.heapStats,
  Bun.generateHeapSnapshot) with Node.js equivalents (globalThis.gc)
- Update all three Dockerfiles from oven/bun base images to
  node:22-bookworm-slim
- Remove @types/bun devDependency
- Update package.json scripts to use node/npx instead of bun

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nathan Flurry 2026-03-22 04:46:52 -07:00
parent 62d56fae64
commit bc872da6f2
6 changed files with 37 additions and 86 deletions

View file

@ -16,7 +16,7 @@ RUN SKIP_OPENAPI_GEN=1 pnpm --filter sandbox-agent build
RUN pnpm --filter @sandbox-agent/foundry-backend build
RUN pnpm --filter @sandbox-agent/foundry-backend deploy --prod /out
FROM oven/bun:1.2 AS runtime
FROM node:22-bookworm-slim AS runtime
ENV NODE_ENV=production
ENV HOME=/home/task
ENV RIVET_RUNNER_VERSION_FILE=/etc/foundry/rivet-runner-version
@ -37,4 +37,4 @@ RUN mkdir -p /etc/foundry \
COPY --from=build /out ./
USER task
EXPOSE 7741
CMD ["bun", "dist/index.js", "start", "--host", "0.0.0.0"]
CMD ["node", "dist/index.js", "start", "--host", "0.0.0.0"]