GTO-Custom-AI commited on
Commit
b0d48d5
·
verified ·
1 Parent(s): 2170680

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official n8n image as the base
2
+ FROM n8nio/n8n:latest
3
+
4
+ # Hugging Face Spaces requires the app to run on port 7860
5
+ ENV N8N_PORT=7860
6
+ ENV N8N_PROTOCOL=https
7
+
8
+ # POINT N8N TO THE PERSISTENT BUCKET
9
+ # In HF Spaces, persistent storage is typically mounted at /data
10
+ ENV N8N_USER_FOLDER=/data/.n8n
11
+
12
+ # Set the user to a non-root user for security
13
+ USER root
14
+ RUN mkdir -p /data/.n8n && chown -R 1000:1000 /data/.n8n
15
+ USER 1000
16
+
17
+ # Expose the HF port
18
+ EXPOSE 7860
19
+
20
+ # Start n8n
21
+ CMD ["n8n", "start"]