n8n use postgres d

This commit is contained in:
2026-01-06 00:27:36 +01:00
parent d3b5f5f317
commit 140f478418
4 changed files with 52 additions and 6 deletions

View File

@@ -0,0 +1,31 @@
# Start with the official n8n image
FROM n8nio/n8n:2.2.1
# Copy apk and its deps from Alpine 3.23
COPY --from=alpine:3.23 /sbin/apk /sbin/apk
COPY --from=alpine:3.23 /usr/lib/libapk.so* /usr/lib/
# Switch to root to install dependencies
USER root
# Install Chromium and necessary dependencies for Puppeteer
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
wget \
nodejs \
npm
# Set environment variable for Puppeteer to find Chromium
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
RUN npm install puppeteer
# Revert back to non-root (default n8n user)
USER node