shameel77 commited on
Commit
0851d3e
·
verified ·
1 Parent(s): 33b18bd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -1,9 +1,15 @@
1
- FROM n8nio/n8n:latest
2
 
3
- USER root
4
- RUN mkdir -p /home/node/.n8n && chown -R node:node /home/node/.n8n
 
5
 
 
 
6
  USER node
 
 
7
  ENV N8N_PORT=7860
 
8
 
9
  CMD ["n8n", "start"]
 
1
+ FROM node:18-alpine
2
 
3
+ # Install required tools and n8n globally
4
+ RUN apk add --no-cache python3 make g++ git \
5
+ && npm install -g n8n@latest
6
 
7
+ # Set up work directory and permissions for safety
8
+ WORKDIR /home/node
9
  USER node
10
+
11
+ # Environment settings for Hugging Face
12
  ENV N8N_PORT=7860
13
+ ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
14
 
15
  CMD ["n8n", "start"]