Skip to content

Commit

Permalink
chore: adding suggested deps for chromium-aws-lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
erikarenhill committed Sep 4, 2024
1 parent 211eeb3 commit 9db2648
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 22 deletions.
25 changes: 14 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_FROM
FROM $BUILD_FROM

# Install dependencies
RUN apk add --no-cache \
# Install dependencies for chrome-aws-lambda
RUN apk --no-cache add \
nodejs \
npm \
nss \
Expand All @@ -13,22 +13,25 @@ RUN apk add --no-cache \
python3 \
make \
g++ \
chromium \
udev \
dumb-init \
libstdc++ \
libc6-compat \
chromium-chromedriver

curl \
fontconfig \
alsa-lib \
at-spi2-core \
cairo \
cups-libs \
dbus-glib \
eudev-libs \
expat \
ttf-opensans

# Set the working directory
WORKDIR /usr/src/app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install app dependencies
RUN npm ci
# Install Puppeteer and chrome-aws-lambda dependencies
RUN npm install

# Copy app source
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Geodnet Headless Console API"
description: "API for Geodnet Console data"
version: "1.0.9"
version: "1.0.10"
slug: "geodnet_headless_console_api"
init: false
arch:
Expand Down
11 changes: 2 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,8 @@ async function setupBrowserAndPage(key) {
try {
console.log(`Configuring launch options for key: ${key}`);
const launchOptions = {
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--disable-accelerated-2d-canvas',
'--no-first-run',
'--no-zygote',
'--disable-gpu'
],
args: [...chromium.args, '--no-sandbox', '--disable-setuid-sandbox'],
executablePath: await chromium.executablePath,
headless: true,
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "geodnet-headless-console-api",
"version": "1.0.9",
"version": "1.0.10",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 9db2648

Please sign in to comment.