fix(docker): use node as runtime

This commit is contained in:
hamster1963 2024-11-23 14:02:18 +08:00
parent f66758bc03
commit 8f5fc7ef71

View File

@ -14,7 +14,7 @@ COPY . .
RUN bun run build RUN bun run build
# Stage 3: Production image # Stage 3: Production image
FROM oven/bun:1-alpine AS runner FROM node:23-alpine AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV=production ENV NODE_ENV=production
COPY --from=builder /app/public ./public COPY --from=builder /app/public ./public
@ -22,4 +22,4 @@ COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/.next/static ./.next/static
EXPOSE 3000 EXPOSE 3000
CMD ["bun", "run", "server.js"] CMD ["node", "run", "server.js"]