news-analyze/Dockerfile
吳元皓 885303b565 Edited using Gemini code.
╭─────────────────────────────────────╮
│                                     │
│  Agent powering down. Goodbye!      │
│                                     │
│                                     │
│  Cumulative Stats (2 Turns)         │
│                                     │
│  Input Tokens              792,501  │
│  Output Tokens              12,280  │
│  Thoughts Tokens             5,295  │
│  ─────────────────────────────────  │
│  Total Tokens              810,076  │
│                                     │
│  Total duration (API)       4m 17s  │
│  Total duration (wall)  3h 40m 47s  │
│                                     │
╰─────────────────────────────────────╯
2025-06-27 00:44:39 +08:00

39 lines
810 B
Docker
Executable File

# If you have customized your output directory, please just remove it. :)
FROM oven/bun:latest as builder
WORKDIR /app
# Copy package files
COPY package.json ./
COPY bun.lock* package-lock.json* yarn.lock* ./
# Install dependencies
RUN bun pm untrusted
RUN bun install
RUN apt-get update && apt-get install -y postgresql-client
# Copy source files
COPY . .
RUN bun run generateVersionTag
# Build the application
RUN bun run build
# Production stage
FROM oven/bun:latest
WORKDIR /app
# Copy package files for production
COPY --from=builder /app/package.json ./
# Copy build outputs from builder
COPY --from=builder /app/.output /app/.output
RUN bun install --production
EXPOSE 3000
CMD ["bun", "run", "start"]