File size: 1,533 Bytes
8c754d9
ac1fafd
 
8c754d9
ac1fafd
 
8c754d9
ac1fafd
 
 
 
 
 
 
 
 
 
 
 
 
 
8c754d9
ac1fafd
 
 
8c754d9
ac1fafd
 
8c754d9
ac1fafd
 
8c754d9
ac1fafd
8c754d9
 
 
ac1fafd
8c754d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ac1fafd
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Use a lightweight Node image
FROM node:24-alpine

# Run as root for setup
USER root

# --- Install required system dependencies ---
RUN apk add --no-cache \
    git \
    python3 \
    py3-pip \
    make \
    g++ \
    build-base \
    cairo-dev \
    pango-dev \
    chromium \
    postgresql-client \
    ffmpeg \
    yt-dlp

# Puppeteer config for n8n
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

# --- Install n8n globally ---
RUN npm install -g n8n@latest

# --- Set up directories and permissions ---
RUN mkdir -p /root/.n8n && chmod -R 700 /root/.n8n

# --- Hardcoded n8n + Supabase configuration ---
ENV N8N_HOST=0.0.0.0
ENV N8N_PORT=7860
ENV N8N_PROTOCOL=https
ENV N8N_RUNNERS_ENABLED=true
ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
ENV WEBHOOK_URL=https://praneshjs-n8n.hf.space
ENV GENERIC_TIMEZONE=Asia/Kolkata
ENV TZ=Asia/Kolkata

# Encryption key (keep safe – don’t change once deployed)
ENV N8N_ENCRYPTION_KEY=a4b0f2369c53c7b748efedfbac38e6b92b7c6b9b1aaecdf1

# --- Database Connection (Supabase) ---
ENV DB_TYPE=postgresdb
ENV DB_POSTGRESDB_DATABASE=postgres
ENV DB_POSTGRESDB_HOST=aws-1-ap-south-1.pooler.supabase.com
ENV DB_POSTGRESDB_PORT=5432
ENV DB_POSTGRESDB_USER=postgres.ngkmduatortmunvxncbr
ENV DB_POSTGRESDB_PASSWORD=Pranesh@5264
ENV DB_POSTGRESDB_SCHEMA=public
ENV DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED=false

# --- Working directory ---
WORKDIR /root/.n8n

# Wait a few seconds before starting (DB ready delay)
CMD sleep 5 && n8n start

EXPOSE 7860