feat(docker): enable containerization of marketplace scraper

Introduce Dockerfile with production build using Bun, .dockerignore for efficient builds, and docker-compose.yml for easy local and prod deployment on port 3000.
This commit is contained in:
old4ever committed 2025-10-03 08:44:51 -04:00
1 parent fa7ac59c45
commit ea0a69ccd6
3 files changed
+192

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
# Use the official Bun base image
FROM oven/bun:latest AS base
# Set the working directory
WORKDIR /app
# Copy package files
COPY package.json bun.lock* ./
# Install dependencies
RUN bun install --frozen-lockfile
# Copy source code
COPY src ./src
COPY tsconfig.json ./
# Build the application for production
RUN bun build ./src/index.ts --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"]