diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f579939 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.git +.gitignore +node_modules +.env +.env.* +.wwebjs_auth +.wwebjs_cache +coverage +dist +out +.wwebjs* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ff3d267 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM oven/bun:1 AS base + +WORKDIR /app + +ENV NODE_ENV=production \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium + +RUN apt-get update && apt-get install -y --no-install-recommends \ + chromium \ + ca-certificates \ + fonts-liberation \ + && rm -rf /var/lib/apt/lists/* + +COPY package.json bun.lock ./ +RUN bun install --frozen-lockfile --production + +COPY . . + +EXPOSE 3000 + +CMD ["bun", "run", "src/index.ts"]