From 6af12e59b7a2a24fa25d3abb32a12f91aa4b2282 Mon Sep 17 00:00:00 2001 From: chark1es Date: Mon, 16 Jun 2025 18:21:18 -0700 Subject: [PATCH] add dockerfile --- Dockerfile | 42 ++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 12 ++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3e9c340 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,42 @@ +# Use the official Bun image +FROM oven/bun:1.1 + +# Install dependencies for Puppeteer (Chromium) +RUN apt-get update && \ + apt-get install -y \ + wget \ + ca-certificates \ + fonts-liberation \ + libasound2 \ + libatk-bridge2.0-0 \ + libatk1.0-0 \ + libcups2 \ + libdbus-1-3 \ + libdrm2 \ + libgbm1 \ + libgtk-3-0 \ + libnspr4 \ + libnss3 \ + libx11-xcb1 \ + libxcomposite1 \ + libxdamage1 \ + libxrandr2 \ + xdg-utils \ + --no-install-recommends && \ + rm -rf /var/lib/apt/lists/* + +# Set working directory +WORKDIR /app + +# Copy package files and install dependencies +COPY bun.lockb package.json ./ +RUN bun install + +# Copy the rest of your app +COPY . . + +# Expose the port your app runs on (change if needed) +EXPOSE 3000 + +# Start the server +CMD ["bun", "run", "start"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8c9e260 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.8" + +services: + web: + build: . + ports: + - "3000:3000" + environment: + - NODE_ENV=production + - PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable + - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true + - PUPPETEER_DISABLE_SANDBOX=true