Skip to content

Commit

Permalink
feat: install new crawler version
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-amadio-acn committed Oct 16, 2024
1 parent 7a15a8d commit 15db442
Show file tree
Hide file tree
Showing 5 changed files with 2,189 additions and 1,783 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM node:18.15.0-buster-slim
FROM node:20.15.0-buster-slim

ARG GEOIP_LICENSE

Expand All @@ -14,14 +14,16 @@ RUN apt-get install -y git
RUN apt-get install -y nano
RUN apt-get install -y chromium

RUN npm install -g npm@9.5.0
RUN npm install -g npm@10.9.0
RUN npm install -g puppeteer

# Bundle app source
COPY . /usr/src/app/

RUN touch /usr/src/app/.env

RUN npm install --verbose
RUN npm install
RUN npx puppeteer browsers install chrome@116.0.5845.96
RUN cd node_modules/geoip-lite && npm run-script updatedb license_key=${GEOIP_LICENSE}

RUN npm run build
Expand Down
10 changes: 6 additions & 4 deletions command/scanManagerItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import yargs from "yargs";
import { hideBin } from "yargs/helpers";
import { dbSM } from "../database/connection";
import { define as jobDefine } from "../database/models/job";
import { run } from "pa-website-validator/dist/controller/launchLighthouse";
import { logLevels } from "pa-website-validator/dist/controller/launchLighthouse";
import { run } from "pa-website-validator-ng/dist/launchScript.js";
import { Job } from "../types/models";
import {
upload as s3Upload,
Expand Down Expand Up @@ -81,12 +80,15 @@ const scan = async (jobId) => {
urlToBeScanned,
jobObjParsed.type,
"online",
logLevels.display_none,
'',
false,
"",
"",
false,
"all"
"all",
300000,
10,
20
);

if (!lighthouseResult.status) {
Expand Down
Loading

0 comments on commit 15db442

Please sign in to comment.