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

Fix: Add Chromium support for browser-dependent community nodes #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
42 changes: 42 additions & 0 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Docker Compose Test

on:
push:
branches: [ "main" ]
paths:
- 'docker-compose.yml'
- 'Dockerfile.n8n'
pull_request:
branches: [ "main" ]
paths:
- 'docker-compose.yml'
- 'Dockerfile.n8n'
workflow_dispatch:

jobs:
test-docker-compose:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create env file
run: |
echo "POSTGRES_USER=n8n" > .env
echo "POSTGRES_PASSWORD=n8n" >> .env
echo "POSTGRES_DB=n8n" >> .env
echo "N8N_ENCRYPTION_KEY=randomkey" >> .env
echo "N8N_USER_MANAGEMENT_JWT_SECRET=randomsecret" >> .env

- name: Test Docker Compose
run: |
docker compose up -d
sleep 30
docker compose ps
docker compose logs
docker compose down
20 changes: 20 additions & 0 deletions Dockerfile.n8n
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM n8nio/n8n:latest

USER root

# Install dependency for chrome browser
RUN apk add --no-cache \
chromium \
chromium-chromedriver \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont

# Set global parameter
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

USER node
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ x-n8n: &service-n8n
- N8N_PERSONALIZATION_ENABLED=false
- N8N_ENCRYPTION_KEY
- N8N_USER_MANAGEMENT_JWT_SECRET
- NODE_FUNCTION_ALLOW_EXTERNAL=*
- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
links:
- postgres
build:
context: .
dockerfile: Dockerfile.n8n

x-ollama: &service-ollama
image: ollama/ollama:latest
Expand Down