-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
24 lines (18 loc) · 1.02 KB
/
Dockerfile.dev
File metadata and controls
24 lines (18 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM n8nio/n8n:latest
USER root
# Copy the built ScraperNode node package into the image
COPY package.json /opt/n8n-nodes-scrapernode/package.json
COPY dist/ /opt/n8n-nodes-scrapernode/dist/
# Create node_modules inside the package and symlink n8n-workflow peer dep
RUN mkdir -p /opt/n8n-nodes-scrapernode/node_modules && \
ln -s /usr/local/lib/node_modules/n8n/node_modules/n8n-workflow \
/opt/n8n-nodes-scrapernode/node_modules/n8n-workflow
# Swap the hardcoded production URL for the dev Convex URL
RUN sed -i 's|https://api.scrapernode.com|https://hidden-weasel-842.convex.site|g' \
/opt/n8n-nodes-scrapernode/dist/nodes/shared/api.js
# Set up the community nodes directory (mirrors how the n8n UI installs nodes)
RUN mkdir -p /home/node/.n8n/nodes/node_modules && \
ln -s /opt/n8n-nodes-scrapernode /home/node/.n8n/nodes/node_modules/n8n-nodes-scrapernode && \
echo '{"name":"n8n-custom-nodes","private":true}' > /home/node/.n8n/nodes/package.json && \
chown -R node:node /home/node/.n8n/nodes
USER node