From ad884df6d1e7ab519af8d96290c1551e62527b73 Mon Sep 17 00:00:00 2001 From: junseublim Date: Mon, 30 Dec 2024 00:32:55 +0900 Subject: [PATCH] feat: add args to speed up puppeteer --- .github/workflows/cicd.yml | 2 +- src/app/board/api/screenshot/route.ts | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index fad1269..b423add 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -46,4 +46,4 @@ jobs: - name: Delete existing container run: docker rm -f polabo-fe || true - name: Run container - run: docker run -d -p 3000:3000 --name polabo-fe ${{ vars.DOCKER_IMAGE }} + run: docker run -d -p 3000:3000 --shm-size=1g --name polabo-fe ${{ vars.DOCKER_IMAGE }} diff --git a/src/app/board/api/screenshot/route.ts b/src/app/board/api/screenshot/route.ts index 1622296..aee9acd 100644 --- a/src/app/board/api/screenshot/route.ts +++ b/src/app/board/api/screenshot/route.ts @@ -16,15 +16,7 @@ const initializeBrowser = async () => { const browser = await puppeteer.launch({ protocolTimeout: 360000, timeout: 60000, - args: [ - '--disable-gpu', - '--disable-dev-shm-usage', - '--disable-setuid-sandbox', - '--no-first-run', - '--no-sandbox', - '--no-zygote', - '--single-process', - ], + args: ['--no-first-run', '--no-sandbox', '--single-process'], }) const page = await browser.newPage() await page.setViewport({