ShayanRl commited on
Commit
0fbf46a
·
verified ·
1 Parent(s): 06ee05b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -13
Dockerfile CHANGED
@@ -1,18 +1,17 @@
1
  FROM node:22
2
 
3
- # Install Chromium and its dependencies
4
  RUN apt-get update && \
5
- apt-get install -y chromium && \
6
  rm -rf /var/lib/apt/lists/*
7
 
8
- # Install n8n and the puppeteer node globally
9
- RUN npm install -g n8n \
10
- && npm install -g jsdom
11
-
12
- # Set Puppeteer to use the installed Chromium
13
- ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
14
 
 
 
15
 
 
16
  VOLUME ["/var/run/docker.sock", "/root/data/home/node/.n8n"]
17
 
18
  # Set environment variables for n8n
@@ -21,14 +20,12 @@ ENV N8N_HOST=shayanrl-n8n.hf.space \
21
  N8N_PROTOCOL=https \
22
  NODE_ENV=production \
23
  WEBHOOK_URL=https://shayanrl-n8n.hf.space \
24
- N8N_USER_FOLDER=/data/shayan/n8n
25
- NODE_FUNCTION_ALLOW_BUILTIN=*
26
  NODE_FUNCTION_ALLOW_EXTERNAL=jsdom
27
-
28
  # Expose the port for n8n
29
  EXPOSE 7860
30
 
31
-
32
-
33
  # Command to run n8n
34
  CMD ["n8n", "start"]
 
1
  FROM node:22
2
 
3
+ # Install Chromium and dependencies
4
  RUN apt-get update && \
5
+ apt-get install -y chromium-browser && \
6
  rm -rf /var/lib/apt/lists/*
7
 
8
+ # Install n8n and jsdom globally
9
+ RUN npm install -g n8n jsdom
 
 
 
 
10
 
11
+ # Set Puppeteer to use installed Chromium
12
+ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
13
 
14
+ # Define volume mounts for persistence
15
  VOLUME ["/var/run/docker.sock", "/root/data/home/node/.n8n"]
16
 
17
  # Set environment variables for n8n
 
20
  N8N_PROTOCOL=https \
21
  NODE_ENV=production \
22
  WEBHOOK_URL=https://shayanrl-n8n.hf.space \
23
+ N8N_USER_FOLDER=/data/shayan/n8n \
24
+ NODE_FUNCTION_ALLOW_BUILTIN=* \
25
  NODE_FUNCTION_ALLOW_EXTERNAL=jsdom
26
+
27
  # Expose the port for n8n
28
  EXPOSE 7860
29
 
 
 
30
  # Command to run n8n
31
  CMD ["n8n", "start"]