mirror of
https://github.com/System-End/scraps.git
synced 2026-04-19 19:45:14 +00:00
25 lines
448 B
Docker
25 lines
448 B
Docker
# Build stage
|
|
FROM oven/bun:1 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json bun.lock ./
|
|
RUN bun install --frozen-lockfile
|
|
|
|
COPY . .
|
|
RUN bun build src/index.ts --target bun --outdir ./dist
|
|
|
|
# Production stage
|
|
FROM oven/bun:1-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
COPY --from=builder /app/package.json ./
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["bun", "run", "dist/index.js"]
|