Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ispras/scrapy-puppeteer-service
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.0.9
Choose a base ref
...
head repository: ispras/scrapy-puppeteer-service
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 5, 2023

  1. Set proxies per context (#27)

    * remove puppeteer-proxy, set proxies per context
    
    * support both per page and per context proxying
    mxsnq authored May 5, 2023
    Copy the full SHA
    2e3ad61 View commit details
  2. Copy the full SHA
    f5fdc37 View commit details

Commits on May 18, 2023

  1. Update to latest Puppeteer (#26)

    * update to pptr 19.11.1
    
    * allow to explicitly specify selector, xpath or timeout to wait for in wait options
    
    * use pptr 20.1.2
    mxsnq authored May 18, 2023
    Copy the full SHA
    9b27034 View commit details

Commits on May 25, 2023

  1. Fix dockerfile (#28)

    * fix dockerfile
    
    * inc version
    mxsnq authored May 25, 2023
    Copy the full SHA
    31be376 View commit details

Commits on Jul 25, 2023

  1. New Action in Scrapy-puppeteer-service (RecaptchaSolver) added (#31)

    * Added new action (recaptcha_solver)
    
    * Fixed dependencies and removed extra code
    
    * Implemented RecaptchaSolver, added comments and description. Changed 2captcha token name. Started to think about fingerprints in browser.
    
    * Implemented RecaptchaSolver, added comments and description. Changed 2captcha token name. Added StealthPlugin
    
    * HotFix: fixed token_2captcha environment variable name
    
    * Deleted extra properties, handled "no tekoen_2captcha" error (scapy-puppeteer)
    MatthewZMSU authored Jul 25, 2023
    Copy the full SHA
    fd5cd71 View commit details
  2. update version

    mxsnq committed Jul 25, 2023
    Copy the full SHA
    cbeae74 View commit details

Commits on Aug 9, 2023

  1. Copy the full SHA
    9faaf63 View commit details
  2. Decode proxy credentials (#33)

    * decode proxy credentials
    
    * update version
    mxsnq authored Aug 9, 2023
    Copy the full SHA
    9173f53 View commit details

Commits on Aug 31, 2023

  1. Added exceptional responses handling (#36)

    * Exceptions processing
    
    * beautifying
    
    * Changed error sending and added processing every error
    
    * Deleted extra middleware
    MatthewZMSU authored Aug 31, 2023
    Copy the full SHA
    90d7004 View commit details
  2. Bump semver from 5.7.1 to 5.7.2 (#35)

    Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
    - [Release notes](https://github.com/npm/node-semver/releases)
    - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
    - [Commits](npm/node-semver@v5.7.1...v5.7.2)
    
    ---
    updated-dependencies:
    - dependency-name: semver
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 31, 2023
    Copy the full SHA
    358331f View commit details
  3. Bump tough-cookie from 4.0.0 to 4.1.3 (#34)

    Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
    - [Release notes](https://github.com/salesforce/tough-cookie/releases)
    - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
    - [Commits](salesforce/tough-cookie@v4.0.0...v4.1.3)
    
    ---
    updated-dependencies:
    - dependency-name: tough-cookie
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 31, 2023
    Copy the full SHA
    917d731 View commit details
  4. update version

    mxsnq authored Aug 31, 2023
    Copy the full SHA
    296b855 View commit details

Commits on Sep 11, 2023

  1. Copy the full SHA
    aa43308 View commit details

Commits on Sep 19, 2023

  1. Community docs (#37)

    * Added security, code of conduct and contributing documents
    
    * Templates for pull requests and issues
    
    * Fix: pull request nesting
    MatthewZMSU authored Sep 19, 2023
    Copy the full SHA
    07d49b9 View commit details

Commits on Dec 8, 2023

  1. DeadContext handling (#39)

    * Added processing of accidental context losses
    
    * Deleted extra middleware
    
    * Added custom errors for more flexible development.
    Now we response with not only 422 but also with 500
    
    * Major logic of middleware:
    set status and send response
    MatthewZMSU authored Dec 8, 2023
    Copy the full SHA
    cc6ff31 View commit details

Commits on Feb 14, 2024

  1. Better logging of everything (#40)

    * Base code for logging. Need to write proper format for logs
    
    * Additional formats
    
    * trying to print error with red colour...
    
    * Completed logs in console
    
    * added logging of pathname
    
    * final changes in order to beautify
    
    * Name consistency
    
    * New paradigm of logging
    
    * fixed action representation in Logs
    
    * Fixed action's header setting
    
    * Creation page fix
    
    * Added contextId and pageId for error logging
    
    * Better naming
    
    * Minor changes to:
    naming, structure
    
    * Minor changes to:
    naming, structure
    
    * Minor changes to:
    naming, structure
    
    * bump version, minor refinements
    
    ---------
    
    Co-authored-by: Max Varlamov <47754003+mxsnq@users.noreply.github.com>
    Co-authored-by: Max Varlamov <varlamov@ispras.ru>
    3 people authored Feb 14, 2024
    Copy the full SHA
    645d27e View commit details

Commits on Apr 18, 2024

  1. Logstash support for logs (#41)

    * Added logstash in service
    
    * Typo
    
    * Comments for middlewares and logs
    
    * added example opensearch configuration
    
    * Documentation
    
    * Easier parsed logs
    
    ---------
    
    Co-authored-by: Max Varlamov <varlamov@ispras.ru>
    MatthewZMSU and mxsnq authored Apr 18, 2024
    Copy the full SHA
    9a7b5e4 View commit details

Commits on Apr 19, 2024

  1. Bump express from 4.17.3 to 4.19.2 (#43)

    Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.19.2.
    - [Release notes](https://github.com/expressjs/express/releases)
    - [Changelog](https://github.com/expressjs/express/blob/master/History.md)
    - [Commits](expressjs/express@4.17.3...4.19.2)
    
    ---
    updated-dependencies:
    - dependency-name: express
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 19, 2024
    Copy the full SHA
    3cdec73 View commit details
  2. Update version in package.json

    mxsnq authored Apr 19, 2024
    Copy the full SHA
    56120d6 View commit details

Commits on May 29, 2024

  1. Standardizing all actions (#42)

    * Typo, TODO and base refactoring
    
    * Action, Screenshot and MHTML now return results in the same manner as other actions
    
    * Comments and deleting unnecessary code.
    
    * Action response is now standardized
    
    * Refactored code to action-ids model
    
    * Mhtml fix
    
    * Make request.query "immutable"
    
    * Fix: too early page closing
    MatthewZMSU authored May 29, 2024
    Copy the full SHA
    02c0fd9 View commit details

Commits on Jun 27, 2024

  1. Healthcheck endpoint (#44)

    * Base healthcheck
    
    * Readme
    
    * Browser info
    
    * Docstring
    
    * bad browser status
    MatthewZMSU authored Jun 27, 2024
    Copy the full SHA
    3999149 View commit details
  2. Update version in package.json

    mxsnq authored Jun 27, 2024
    Copy the full SHA
    ca1e25c View commit details

Commits on Jul 4, 2024

  1. Context limit middleware (#45)

    * Base
    
    * separated middlewares
    
    * readme
    
    * Too many requests error
    
    * Now limit_context is a small service.
    
    * Typos
    
    * Typos
    
    * Delete useless variable
    
    * Version update
    MatthewZMSU authored Jul 4, 2024
    Copy the full SHA
    615340c View commit details

Commits on Jul 15, 2024

  1. Stress tests (#46)

    * Docs and tests
    
    * Update version
    
    * Change DDoS url
    MatthewZMSU authored Jul 15, 2024
    Copy the full SHA
    244cbb0 View commit details
  2. Metrics (#47)

    * Base endpoint
    
    * OpenTelemetry usage
    
    * Working metrics
    
    * Final meter module, dependencies and version update
    
    * Documentation
    
    * Docker-compose example
    MatthewZMSU authored Jul 15, 2024
    Copy the full SHA
    edfb883 View commit details

Commits on Jul 22, 2024

  1. Context timeout (#48)

    * Base of timing out contexts
    
    * Docs
    
    ---------
    
    Co-authored-by: Alexander <9622929+Yatskov@users.noreply.github.com>
    MatthewZMSU and Yatskov authored Jul 22, 2024
    Copy the full SHA
    8ef48e9 View commit details

Commits on Aug 8, 2024

  1. Add har files (#49)

    * Har add to scrapy-puppeteer-service
    
    * fix
    
    * fix
    
    * Refactoring
    
    * "version": "0.3.3"
    AndrewKorzh authored Aug 8, 2024
    Copy the full SHA
    cf90be7 View commit details

Commits on Aug 15, 2024

  1. add-FormAction (#50)

    * add-FormAction
    
    * add documentation
    
    * add documentation
    
    * change FormAction to FillForm
    
    * add some check in fill_form
    
    * Update fill_form.js
    
    * Har support
    
    * Remove excess
    
    ---------
    
    Co-authored-by: matthew <matvey.zvancov10@gmail.com>
    AndrewKorzh and MatthewZMSU authored Aug 15, 2024
    Copy the full SHA
    0d891f9 View commit details

Commits on Aug 22, 2024

  1. Fix context counters (#51)

    * Update context counter when timeout context
    
    * Synchronisation of ContextCounters
    
    * Fixed bug when `Changing contextCounter from -4 to 0 due to synchronization` due to context falling off.
    
    * Structure changes
    
    * Logging error and version++
    MatthewZMSU authored Aug 22, 2024
    Copy the full SHA
    581e3be View commit details
  2. VNC (#52)

    * Some base
    
    * Testing
    
    * Working vnc but not working HEADFULL
    
    * Working!
    
    * Not working solution in HEADLESS=false
    
    * Working VNC!
    
    * Puppeteer version update
    
    * Simplified Dockerfile
    
    * Docs
    
    * Changes due to self-review
    
    * Dependencies
    MatthewZMSU authored Aug 22, 2024
    Copy the full SHA
    c6225c0 View commit details

Commits on Sep 2, 2024

  1. Copy the full SHA
    7b48612 View commit details

Commits on Sep 24, 2024

  1. Update pptr (#57)

    Yatskov authored Sep 24, 2024
    Copy the full SHA
    831d659 View commit details
  2. Upper version

    Yatskov committed Sep 24, 2024
    Copy the full SHA
    b37e0ae View commit details

Commits on Oct 9, 2024

  1. Compose action (#53)

    * proper handling of exceptions.
    
    * action-router model
    
    * Now we throw errors and action is more error-prone.
    
    * compose action
    
    * Fix everything...
    
    * Working service!
    
    * Docs
    
    * Fixes after review
    
    * Fixes after review
    MatthewZMSU authored Oct 9, 2024
    Copy the full SHA
    8139dee View commit details

Commits on Nov 6, 2024

  1. NoVNC (#58)

    * Fix README
    
    * NoVNC
    
    * README
    MatthewZMSU authored Nov 6, 2024
    Copy the full SHA
    3337ec3 View commit details
  2. Update package.json

    Upper version to 0.3.9
    Yatskov authored Nov 6, 2024
    Copy the full SHA
    aadfaf5 View commit details

Commits on Dec 19, 2024

  1. Logstash restart (#62)

    * change max_connect_retries
    
    * dependencies
    MatthewZMSU authored Dec 19, 2024
    Copy the full SHA
    9e6eba4 View commit details
  2. Bump pptr versions (#60)

    * pptr versions
    
    * dependencies
    MatthewZMSU authored Dec 19, 2024
    Copy the full SHA
    29ca65c View commit details
  3. Action structure validation (#61)

    * Validate action
    
    * dependencies
    
    * dependencies
    
    * typo
    MatthewZMSU authored Dec 19, 2024
    Copy the full SHA
    db98efd View commit details

Commits on Jan 21, 2025

  1. Increase captcha solver timeout (#63)

    * increase captcha solver timeout
    
    * fix version and readme
    mxsnq authored Jan 21, 2025
    Copy the full SHA
    9f73b56 View commit details

Commits on Mar 3, 2025

  1. Copy the full SHA
    30a5a74 View commit details
  2. Destroy new contexts on errors (#65)

    * destroy new contexts on errors
    
    * update version
    mxsnq authored Mar 3, 2025
    Copy the full SHA
    185c7b0 View commit details
Showing with 3,973 additions and 920 deletions.
  1. +1 −1 .dockerignore
  2. +33 −0 .github/ISSUE_TEMPLATE/bug_report.md
  3. +20 −0 .github/ISSUE_TEMPLATE/feature_request.md
  4. +37 −0 .github/pull_request_template.md
  5. +1 −0 .gitignore
  6. +47 −0 CODE_OF_CONDUCT.md
  7. +20 −0 CONTRIBUTING.md
  8. +30 −12 Dockerfile
  9. +218 −34 README.md
  10. +19 −0 SECURITY.md
  11. +33 −0 actions/action.js
  12. +39 −0 actions/click.js
  13. +57 −0 actions/compose.js
  14. +35 −0 actions/fill_form.js
  15. +6 −0 actions/goback.js
  16. +6 −0 actions/goforward.js
  17. +33 −0 actions/goto.js
  18. +14 −0 actions/har.js
  19. +11 −0 actions/mhtml.js
  20. +44 −0 actions/recaptcha_solver.js
  21. +13 −0 actions/screenshot.js
  22. +24 −0 actions/scroll.js
  23. +72 −9 app.js
  24. +46 −0 docker-compose.dev-opensearch.yml
  25. +23 −0 docker-compose.dev-prometheus.yml
  26. +39 −0 helpers/exceptions.js
  27. +29 −0 helpers/limit_context.js
  28. +114 −0 helpers/loggers.js
  29. +42 −0 helpers/meter.js
  30. +3 −0 helpers/middlewares/index.js
  31. +30 −0 helpers/middlewares/logging.js
  32. +42 −0 helpers/middlewares/process_exception.js
  33. +71 −0 helpers/timeout_context.js
  34. +162 −56 helpers/utils.js
  35. +14 −0 logstash/pipeline/logs_pipeline.conf
  36. +19 −6 package.json
  37. +7 −0 prometheus/prometheus.yml
  38. +3 −33 routes/action.js
  39. +4 −41 routes/click.js
  40. +18 −0 routes/compose.js
  41. +18 −0 routes/fill_form.js
  42. +6 −12 routes/goback.js
  43. +6 −12 routes/goforward.js
  44. +4 −28 routes/goto.js
  45. +4 −12 routes/har.js
  46. +51 −0 routes/health_check.js
  47. +3 −12 routes/mhtml.js
  48. +25 −0 routes/recaptcha_solver.js
  49. +4 −15 routes/screenshot.js
  50. +4 −26 routes/scroll.js
  51. +17 −0 start_container.sh
  52. +8 −0 start_vnc.sh
  53. +22 −0 tests/stress/README.md
  54. +24 −0 tests/stress/artillery-ram-usage-test.yml
  55. +23 −0 tests/stress/artillery-sequential-load-test.yml
  56. +8 −0 wait_for_logstash.sh
  57. +2,267 −611 yarn.lock
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
.gitignore
.git
.git
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**.
A clear and concise description of what the bug is.

**To Reproduce**.
Steps to reproduce the behavior:
1. Set essential settings.py
2. Provide sequence of actions you made in spider
3. Make log-file with error
4. See error

**Expected behavior**.
A clear and concise description of what you expected to happen.

**Screenshots**.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Python version: [e.g. 3.11.4]
- Scrapy version: [e.g. 2.10]
- Scrapy-puppeteer version: [e.g. 0.1.0]

**Additional context**.
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for scrapy-puppeteer-service
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**.
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**.
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**.
Add any other context or screenshots about the feature request here.
37 changes: 37 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Title

Please, provide meaningful title

# Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
List any dependencies that are required for this change.

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

**Test Configuration**:
* Software version:
* Hardware:

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
node_modules
.gitignore
47 changes: 47 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# *Code Of Conduct*

---
Just like any other technical community, Scrapy-puppeteer-service team and community is made up
of many people from all over the world. We want to join them into one huge community of *Scrapy-puppeteer-service*.

As there are many diverse people with different points of view, we decided to write rules for contributing,
issue declaring and discussion. We hope everybody would follow them and enjoy spending time within the community!

This code of conduct applies to all spaces managed by Scrapy-puppeteer-service project and to all members
of its community.

If you believe someone is violating the code of conduct, we ask that you report it by
emailing us.

* Be friendly and patient.
* Be welcoming. We strive to be a community that welcomes and supports people of all backgrounds and identities.
This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration
status, social and economic class, educational level, sex, age, size, family status, political belief, religion,
and mental and physical ability.
* Be considerate. Your work will be used by other people, and you in turn will depend on the work of others.
Any decision you take will affect users and colleagues, and you should take those consequences into account
when making decisions. Remember that we're a world-wide community, so you might not be communicating in
someone else's primary language.
* Be respectful. Not all of us will agree all the time, but disagreement is no excuse for poor behavior or
bad manners. We might all experience some frustration now and then, but we cannot allow that frustration to
turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or
threatened is not a productive one. Members of the Scrapy-puppeteer-service community should be respectful when dealing
with other members as well as with people outside the community.
* Be careful in the words that you choose. We are a community of professionals, and we conduct ourselves
professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary
behavior aren't acceptable. This includes, but is not limited to:
1. Violent threats or language directed against another person.
2. Discriminatory jokes and language.
3. Posting (or threatening to post) other people's personally identifying information ("doxing").
4. Personal insults.
5. Advocating for, or encouraging, any of the above behavior.
6. Repeated harassment of others. In general, if someone asks you to stop, then stop.
* When we disagree, try to understand why. Disagreements, both social and technical, happen all the time and
Scrapy-puppeteer-service is no exception. It is important that we resolve disagreements and differing views constructively.
Remember that we’re different. The strength of Scrapy-puppeteer-service comes from its varied community, people from a
wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why
someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming
each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.


Original text from [DJango](https://www.djangoproject.com/conduct/).
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Contributing to Scrapy-puppeteer-service

---
As an open source project, Scrapy-puppeteer-service welcomes contributions of many forms.

Examples of contributions include:

* Code patches
* Documentation improvements
* Bug reports and patch reviews

**Warning: any pull request without informative title, meaningful description will be closed!**

`Please formalize your pull request (PR)` you will get.

---
# Code of Conduct

As a contributor, you can help us keep the Scrapy-puppeteer-service community open and inclusive.
Please read and follow our [Code Of Conduct](https://github.com/ispras/scrapy-puppeteer-service/blob/master/CODE_OF_CONDUCT.md).
42 changes: 30 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
FROM node:10.16.3
FROM node:18

RUN apt-get update && \
apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget && \
rm -rf /var/lib/apt/lists/*
ENV USER=root
ENV DISPLAY=:1
ENV RESOLUTION=1080x720

# 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 tightvncserver xfce4 xfce4-goodies xfonts-base dbus-x11 novnc \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/googlechrome-linux-keyring.gpg \
&& sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/googlechrome-linux-keyring.gpg] 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-khmeros fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& ln /usr/share/novnc/vnc.html /usr/share/novnc/index.html \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /app
COPY . /app/
WORKDIR /app
ENV NODE_PATH=/app/node_modules
RUN npm install

# Add user so we don't need --no-sandbox.
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
&& mkdir -p /home/pptruser/Downloads \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /app/node_modules
&& chown -R pptruser:pptruser /app \
&& chmod +x start_vnc.sh \
&& chmod +x start_container.sh

USER pptruser

RUN yarn install

# puppeteer-service
EXPOSE 3000
CMD npm start
# VNC-server
EXPOSE 5901
# NoVNC
EXPOSE 5900

CMD ./start_container.sh
Loading