Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install new crawler version #61

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading