Skip to content

Commit

Permalink
feat: add args to speed up puppeteer
Browse files Browse the repository at this point in the history
  • Loading branch information
junseublim committed Dec 29, 2024
1 parent 0a782d3 commit ad884df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
10 changes: 1 addition & 9 deletions src/app/board/api/screenshot/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit ad884df

Please sign in to comment.