fix: ARM Chromium support, Dockerfile improvements, ESM build fix
This commit is contained in:
parent
6896b72e0c
commit
facb8df8f4
2 changed files with 10 additions and 8 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue