Socket
Socket
Sign inDemoInstall

n8n-nodes-pageres

Package Overview
Dependencies
285
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    n8n-nodes-pageres

An n8n node that use pageres to take screenshot of websites


Version published
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

n8n-nodes-pageres

An n8n node that use pageres to take screenshot of websites.

Usage

Docker

If you're running n8n via Docker, you will have to create a Docker image with the node module installed in n8n. Follow the steps mentioned below:

  1. Create a Dockerfile and paste the following code
FROM node:14.15-alpine

ARG N8N_VERSION

RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi

# Update everything and install needed dependencies
RUN apk add --update graphicsmagick tzdata git tini su-exec

# # Set a custom user to not have n8n run as root
USER root

# Install n8n and the also temporary all the packages
# it needs to build it correctly.
RUN apk --update add --virtual build-dependencies python build-base ca-certificates && \
	npm_config_user=root npm install -g full-icu n8n@${N8N_VERSION} && \
	apk del build-dependencies \
	&& rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root;

# Install n8n-nodes-pageres
RUN cd /usr/local/lib/node_modules/n8n && npm install n8n-nodes-pageres

# Install fonts
RUN apk --no-cache add --virtual fonts msttcorefonts-installer fontconfig && \
	update-ms-fonts && \
	fc-cache -f && \
	apk del fonts && \
	find  /usr/share/fonts/truetype/msttcorefonts/ -type l -exec unlink {} \; \
	&& rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root

ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu

WORKDIR /data

COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]

EXPOSE 5678/tcp
  1. Create a docker-entrypoint.sh file with the following code.
#!/bin/sh

if [ -d /root/.n8n ] ; then
  chmod o+rx /root
  chown -R node /root/.n8n
  ln -s /root/.n8n /home/node/
fi

chown -R node /home/node

if [ "$#" -gt 0 ]; then
  # Got started with arguments
  exec su-exec node "$@"
else
  # Got started without arguments
  exec su-exec node n8n
fi
  1. Create your Docker image
docker build -t n8n-custom .
  1. Start the container
docker run -p 5678:5678 n8n-custom

Navigate to your instance (localhost:5678 if you're running locally) to access the pageres node.

Other

If you’re running either by installing it globally or via PM2, make sure that you install n8n-nodes-pageres inside n8n. n8n will find the module and load it automatically.

Contributing

To contribute, refer to CONTRIBUTING.md.

Keywords

FAQs

Last updated on 02 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc