Files
joel/Dockerfile
2026-01-29 12:26:13 +01:00

33 lines
623 B
Docker

# Build stage
FROM oven/bun:1 AS builder
WORKDIR /app
# Copy package files
COPY package.json bun.lockb ./
# Install dependencies
RUN bun install --frozen-lockfile --production
# Copy source code
COPY src ./src
COPY tsconfig.json drizzle.config.ts ./
# Production stage
FROM oven/bun:1-slim
WORKDIR /app
# Copy from builder
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/src ./src
COPY --from=builder /app/package.json ./
COPY --from=builder /app/tsconfig.json ./
# Set environment variables
ENV NODE_ENV=production
ENV LOG_LEVEL=info
# Run the bot
CMD ["bun", "run", "src/index.ts"]