T1ckbase commited on
Commit
6f02bab
Β·
1 Parent(s): cd003a0
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. main.ts +2 -2
Dockerfile CHANGED
@@ -9,11 +9,11 @@ ENV PLAYWRIGHT_BROWSERS_PATH=/app/node_modules/playwright/.local-browsers
9
  # Copy source
10
  COPY . .
11
 
12
- RUN deno -A npm:playwright install --with-deps chromium
13
-
14
  # Compile the main app
15
  RUN deno cache main.ts
16
 
 
 
17
  RUN chmod -R 777 /app
18
 
19
  # Run the app
 
9
  # Copy source
10
  COPY . .
11
 
 
 
12
  # Compile the main app
13
  RUN deno cache main.ts
14
 
15
+ RUN deno -A npm:playwright install --with-deps chromium
16
+
17
  RUN chmod -R 777 /app
18
 
19
  # Run the app
main.ts CHANGED
@@ -9,7 +9,7 @@ app.use('/screenshot.png', serveStatic({ path: './screenshot.png' }));
9
  app.get('/', (c) => c.text('Hello World!'));
10
 
11
  const browser = await chromium.launch({
12
- headless: false,
13
  args: ['--disable-blink-features=AutomationControlled'],
14
  });
15
  const context = await browser.newContext({
@@ -31,7 +31,7 @@ await page.screenshot({ path: 'screenshot.png', fullPage: true });
31
 
32
  // await page.pause();
33
 
34
- await page.waitForEvent('close', { timeout: 0 });
35
 
36
  await context.close();
37
  await browser.close();
 
9
  app.get('/', (c) => c.text('Hello World!'));
10
 
11
  const browser = await chromium.launch({
12
+ headless: true,
13
  args: ['--disable-blink-features=AutomationControlled'],
14
  });
15
  const context = await browser.newContext({
 
31
 
32
  // await page.pause();
33
 
34
+ // await page.waitForEvent('close', { timeout: 0 });
35
 
36
  await context.close();
37
  await browser.close();