AnishaG0201 commited on
Commit
db37eb4
·
verified ·
1 Parent(s): 20b52b0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -11
Dockerfile CHANGED
@@ -1,7 +1,17 @@
1
- # Use the official n8n Docker image as the base
2
- FROM n8nio/n8n:latest
3
 
4
- # Set necessary environment variables for n8n
 
 
 
 
 
 
 
 
 
 
 
 
5
  ENV N8N_PORT=7860
6
  ENV N8N_HOST="0.0.0.0"
7
  ENV N8N_BASIC_AUTH_ACTIVE=true
@@ -9,14 +19,8 @@ ENV N8N_BASIC_AUTH_USER="admin"
9
  ENV N8N_BASIC_AUTH_PASSWORD="password"
10
  ENV N8N_ENCRYPTION_KEY="lkYz6txw4qe+lCTU4Yslf1xNcn9vbwABIwMnqniv6t4="
11
 
12
- # Ensure correct permissions for the installation
13
- USER root
14
-
15
- # Install n8n
16
- RUN npm install -g n8n --unsafe-perm=true
17
-
18
- # Expose the port n8n will run on
19
  EXPOSE 7860
20
 
21
  # Start n8n
22
- CMD ["n8n", "start"]
 
 
 
1
 
2
+
3
+
4
+
5
+ # Use the official Node.js image as the base
6
+ FROM node:16
7
+
8
+ # Set working directory
9
+ WORKDIR /usr/src/app
10
+
11
+ # Install n8n globally
12
+ RUN npm install -g n8n --unsafe-perm=true
13
+
14
+ # Set environment variables for n8n
15
  ENV N8N_PORT=7860
16
  ENV N8N_HOST="0.0.0.0"
17
  ENV N8N_BASIC_AUTH_ACTIVE=true
 
19
  ENV N8N_BASIC_AUTH_PASSWORD="password"
20
  ENV N8N_ENCRYPTION_KEY="lkYz6txw4qe+lCTU4Yslf1xNcn9vbwABIwMnqniv6t4="
21
 
22
+ # Expose the port for n8n
 
 
 
 
 
 
23
  EXPOSE 7860
24
 
25
  # Start n8n
26
+ CMD ["n8n"]