fix(hub): switch Dockerfile from npm to bun
hub project uses bun.lock, but Dockerfile was using npm install which resolves dependencies differently. Switched to oven/bun image and bun install --frozen-lockfile for deterministic builds. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Code
parent
3dfde5e872
commit
3be2744070
@@ -1,13 +1,13 @@
|
||||
# ── Build stage ──
|
||||
FROM node:22-alpine AS builder
|
||||
FROM oven/bun:1.2 AS builder
|
||||
WORKDIR /app
|
||||
COPY apps/hub/package.json apps/hub/bun.lock ./
|
||||
RUN npm install --frozen-lockfile
|
||||
RUN bun install --frozen-lockfile
|
||||
COPY apps/hub .
|
||||
RUN npm run build
|
||||
RUN bun run build
|
||||
|
||||
# ── Runtime ──
|
||||
FROM node:22-alpine AS runtime
|
||||
FROM oven/bun:1.2 AS runtime
|
||||
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/.next ./.next
|
||||
@@ -18,4 +18,4 @@ RUN rm -rf .next/cache && chown -R appuser:appgroup .next
|
||||
USER appuser
|
||||
EXPOSE 3000
|
||||
ENV PORT=3000 NODE_ENV=production
|
||||
CMD ["npm", "run", "start"]
|
||||
CMD ["bun", "run", "start"]
|
||||
|
||||
Reference in New Issue
Block a user