24 lines
450 B
Docker
24 lines
450 B
Docker
FROM oven/bun:1-alpine AS builder
|
|
|
|
RUN apk add --no-cache python3 make g++ linux-headers
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json bun.lock ./
|
|
RUN bun install --frozen-lockfile
|
|
|
|
COPY . .
|
|
RUN bun --bun run build
|
|
|
|
# ---- runtime ----
|
|
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/.output .output
|
|
COPY --from=builder /app/node_modules/ws .output/server/node_modules/ws
|
|
|
|
ENV NODE_ENV=production
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", ".output/server/index.mjs"]
|