Skip to content

Commit

Permalink
feat: featureScreenshot, onlyDomains, ./config.js, serverLoadPercent,…
Browse files Browse the repository at this point in the history
… maxConcurrency, node 14 -> 18
  • Loading branch information
popstas committed Mar 23, 2024
1 parent 69894c0 commit 181f6ae
Show file tree
Hide file tree
Showing 11 changed files with 2,669 additions and 3,552 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ Dockerfile*
.git/**
node_modules
data/
/config.js
/undefined*
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ JSON_URL=""
SERVER_URL=http://localhost:5301
FRONTEND_URL=http://localhost:5302
SCAN_DEFAULT_MAX_REQUESTS=0
SCAN_DEFAULT_URL="https://blog.popstas.ru/"
MAX_CONCURRENCY=5
YAKE_SERVER_URL=http://yake:5000/yake/
# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# ONLY_DOMAINS=gmail.com,corp.com
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ data/
!package-data.json
!package-lock.json
*.code-workspace
/undefined*
/config.js
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ data/
.idea/
.vscode/
.env
/config.js
/undefined*
21 changes: 20 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
FROM buildkite/puppeteer:8.0.0
FROM node:18-slim

# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
# installs, work.
RUN apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libx11-xcb1 \
libxtst6 \
&& rm -rf /var/lib/apt/lists/*

# ARG PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=${PUPPETEER_SKIP_CHROMIUM_DOWNLOAD:-"false"}
# ARG PUPPETEER_EXECUTABLE_PATH=/node_modules/puppeteer/.local-chromium/linux-782078/chrome-linux/chrome
Expand All @@ -7,6 +25,7 @@ FROM buildkite/puppeteer:8.0.0
# apk upgrade && \
# apk add --no-cache git

RUN mkdir /app
WORKDIR /app
COPY package*.json ./

Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ services:
environment:
PORT: ${SERVER_PORT}
YAKE_SERVER_URL: ${YAKE_SERVER_URL}
MAX_CONCURRENCY: ${MAX_CONCURRENCY}
ONLY_DOMAINS: ${ONLY_DOMAINS}
SCAN_DEFAULT_URL: ${SCAN_DEFAULT_URL}
ports:
- ${SERVER_PORT}:${SERVER_PORT}
volumes:
Expand Down

0 comments on commit 181f6ae

Please sign in to comment.