OptiCastDigital commited on
Commit
2ba6d39
·
verified ·
1 Parent(s): 597cce7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -1,18 +1,18 @@
1
  FROM node:20-bullseye-slim
2
 
3
- # Install dependencies
4
  RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
5
 
6
  # Install n8n
7
  RUN npm install -g n8n@2.3.5
8
 
9
- # Expose port
10
- EXPOSE 7860
11
 
12
- # Set environment variables
13
- ENV N8N_PORT=7860
14
- ENV N8N_HOST=0.0.0.0
15
- ENV NODE_ENV=production
16
 
17
- # Start n8n
18
- CMD ["n8n", "start", "--tunnel"]
 
 
 
1
  FROM node:20-bullseye-slim
2
 
3
+ # Install curl and node‑httpserver for root proxy
4
  RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
5
 
6
  # Install n8n
7
  RUN npm install -g n8n@2.3.5
8
 
9
+ # Install a simple static server for the root
10
+ RUN npm install -g http‑server
11
 
12
+ # Expose the n8n UI port
13
+ EXPOSE 7860
 
 
14
 
15
+ # Start both:
16
+ # 1) an HTTP static server to serve / or redirect
17
+ # 2) n8n
18
+ CMD bash -c "http-server -p 7860 --silent & n8n start --tunnel --host=0.0.0.0 --port=7860"