PraneshJs commited on
Commit
8c754d9
·
verified ·
1 Parent(s): ac1fafd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -8
Dockerfile CHANGED
@@ -1,8 +1,10 @@
 
1
  FROM node:24-alpine
2
 
 
3
  USER root
4
 
5
- # Install dependencies
6
  RUN apk add --no-cache \
7
  git \
8
  python3 \
@@ -17,22 +19,43 @@ RUN apk add --no-cache \
17
  ffmpeg \
18
  yt-dlp
19
 
20
- # Chromium for Puppeteer
21
  ENV PUPPETEER_SKIP_DOWNLOAD=true
22
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
23
 
24
- # Install n8n
25
  RUN npm install -g n8n@latest
26
 
27
- # Permissions + directory setup
28
  RUN mkdir -p /root/.n8n && chmod -R 700 /root/.n8n
29
 
30
- # Configure n8n ports
31
- ENV N8N_PORT=7860
32
  ENV N8N_HOST=0.0.0.0
 
 
 
33
  ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
34
-
35
- # Wait briefly before starting to ensure DB connection is ready
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  CMD sleep 5 && n8n start
37
 
38
  EXPOSE 7860
 
1
+ # Use a lightweight Node image
2
  FROM node:24-alpine
3
 
4
+ # Run as root for setup
5
  USER root
6
 
7
+ # --- Install required system dependencies ---
8
  RUN apk add --no-cache \
9
  git \
10
  python3 \
 
19
  ffmpeg \
20
  yt-dlp
21
 
22
+ # Puppeteer config for n8n
23
  ENV PUPPETEER_SKIP_DOWNLOAD=true
24
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
25
 
26
+ # --- Install n8n globally ---
27
  RUN npm install -g n8n@latest
28
 
29
+ # --- Set up directories and permissions ---
30
  RUN mkdir -p /root/.n8n && chmod -R 700 /root/.n8n
31
 
32
+ # --- Hardcoded n8n + Supabase configuration ---
 
33
  ENV N8N_HOST=0.0.0.0
34
+ ENV N8N_PORT=7860
35
+ ENV N8N_PROTOCOL=https
36
+ ENV N8N_RUNNERS_ENABLED=true
37
  ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
38
+ ENV WEBHOOK_URL=https://praneshjs-n8n.hf.space
39
+ ENV GENERIC_TIMEZONE=Asia/Kolkata
40
+ ENV TZ=Asia/Kolkata
41
+
42
+ # Encryption key (keep safe – don’t change once deployed)
43
+ ENV N8N_ENCRYPTION_KEY=a4b0f2369c53c7b748efedfbac38e6b92b7c6b9b1aaecdf1
44
+
45
+ # --- Database Connection (Supabase) ---
46
+ ENV DB_TYPE=postgresdb
47
+ ENV DB_POSTGRESDB_DATABASE=postgres
48
+ ENV DB_POSTGRESDB_HOST=aws-1-ap-south-1.pooler.supabase.com
49
+ ENV DB_POSTGRESDB_PORT=5432
50
+ ENV DB_POSTGRESDB_USER=postgres.ngkmduatortmunvxncbr
51
+ ENV DB_POSTGRESDB_PASSWORD=Pranesh@5264
52
+ ENV DB_POSTGRESDB_SCHEMA=public
53
+ ENV DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED=false
54
+
55
+ # --- Working directory ---
56
+ WORKDIR /root/.n8n
57
+
58
+ # Wait a few seconds before starting (DB ready delay)
59
  CMD sleep 5 && n8n start
60
 
61
  EXPOSE 7860