ShayanRl commited on
Commit
062c443
·
verified ·
1 Parent(s): 0f3a19f
Files changed (1) hide show
  1. Dockerfile +10 -15
Dockerfile CHANGED
@@ -1,14 +1,5 @@
1
- # Use an appropriate base image
2
- FROM node:18
3
-
4
- # Install Traefik and n8n
5
- RUN apt-get update && apt-get install -y \
6
- traefik \
7
- && npm install -g n8n
8
-
9
- # Copy the custom startup script
10
- COPY start.sh /start.sh
11
- RUN chmod +x /start.sh
12
 
13
  # Set environment variables
14
  ENV N8N_HOST=shayanrl-n8n.hf.space \
@@ -17,8 +8,12 @@ ENV N8N_HOST=shayanrl-n8n.hf.space \
17
  NODE_ENV=production \
18
  WEBHOOK_URL=https://shayanrl-n8n.hf.space/app1
19
 
20
- # Expose necessary ports
21
- EXPOSE 80 443 7860
 
 
 
 
22
 
23
- # Start all services
24
- CMD ["/start.sh"]
 
1
+ # n8n Dockerfile
2
+ FROM docker.n8n.io/n8nio/n8n
 
 
 
 
 
 
 
 
 
3
 
4
  # Set environment variables
5
  ENV N8N_HOST=shayanrl-n8n.hf.space \
 
8
  NODE_ENV=production \
9
  WEBHOOK_URL=https://shayanrl-n8n.hf.space/app1
10
 
11
+ # Expose the port for n8n
12
+ EXPOSE 7860
13
+
14
+ # Mount necessary volumes
15
+ VOLUME ["/var/run/docker.sock", "/root/data/.n8n:/home/node/.n8n"]
16
+
17
 
18
+ # Command to run n8n
19
+ CMD ["n8n", "start"]