GTO-Custom-AI commited on
Commit
ea5d54b
·
verified ·
1 Parent(s): eb5d005

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -19
Dockerfile CHANGED
@@ -1,31 +1,23 @@
1
- # Use Alpine as a clean base
2
- FROM alpine:3.19
3
 
4
- # Install Node.js, npm, and essential build tools (Python, Make, G++)
5
- RUN apk add --no-cache \
6
- nodejs \
7
- npm \
8
- python3 \
9
- make \
10
- g++ \
11
- curl \
12
- bash
13
 
14
- # Install n8n globally
15
- RUN npm install -g n8n
 
16
 
17
  # HF Spaces requirements
18
  ENV N8N_PORT=7860
19
  ENV N8N_PROTOCOL=https
20
  ENV N8N_USER_FOLDER=/data/.n8n
21
 
22
- # Create the data directory and force ownership
23
- USER root
24
- RUN mkdir -p /data/.n8n && chown -R 1000:1000 /data/.n8n
25
  USER 1000
26
 
27
- # Expose port
28
  EXPOSE 7860
29
 
30
- # Launch n8n
31
- CMD ["n8n", "start"]
 
1
+ FROM n8nio/n8n:latest
 
2
 
3
+ USER root
4
+
5
+ # Create and prep the data directory
6
+ RUN mkdir -p /data/.n8n && chown -R 1000:1000 /data/.n8n
 
 
 
 
 
7
 
8
+ # Copy our startup script into the image
9
+ COPY start.sh /start.sh
10
+ RUN chmod +x /start.sh
11
 
12
  # HF Spaces requirements
13
  ENV N8N_PORT=7860
14
  ENV N8N_PROTOCOL=https
15
  ENV N8N_USER_FOLDER=/data/.n8n
16
 
17
+ # Use the HF user for the app, but the script handles the permissions
 
 
18
  USER 1000
19
 
 
20
  EXPOSE 7860
21
 
22
+ # Run the wrapper script
23
+ CMD ["/start.sh"]