Files
ca-marketplace-scraper/Dockerfile
2025-12-13 20:31:10 -05:00

32 lines
674 B
Docker

# Use the official Bun base image
FROM oven/bun:latest AS base
# Set the working directory
WORKDIR /app
# Copy package files for monorepo
COPY package.json bun.lock* ./
# Install dependencies
RUN bun install --frozen-lockfile
# Copy monorepo packages
COPY packages ./packages
# Build the application for production
RUN cd packages/scraper && bun build ./src/index.ts --target=bun --outdir=../../dist --minify
# Multi-stage build - runtime stage
FROM oven/bun:latest AS runtime
WORKDIR /app
# Copy the built application from the base stage
COPY --from=base /app/dist/ ./
# Expose the port the app runs on
EXPOSE 3000
# Start the application
CMD ["bun", "index.js"]