fix: ARM Chromium support, Dockerfile improvements, ESM build fix

This commit is contained in:
DocFast Bot 2026-02-14 13:46:15 +00:00
parent 6896b72e0c
commit facb8df8f4
2 changed files with 10 additions and 8 deletions

View file

@ -3,9 +3,11 @@ import puppeteer, { Browser, Page } from "puppeteer";
let browser: Browser | null = null;
export async function initBrowser(): Promise<void> {
const execPath = process.env.PUPPETEER_EXECUTABLE_PATH || undefined;
browser = await puppeteer.launch({
headless: true,
args: ["--no-sandbox", "--disable-setuid-sandbox", "--disable-gpu"],
executablePath: execPath,
args: ["--no-sandbox", "--disable-setuid-sandbox", "--disable-gpu", "--disable-dev-shm-usage"],
});
console.log("Browser pool ready");
}