File size: 1,057 Bytes
31720d6
 
4d69c8e
31720d6
 
4d69c8e
31720d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ddd248f
31720d6
ddd248f
4d69c8e
31720d6
 
 
 
 
4d69c8e
 
 
 
ddd248f
0ec6a20
4d69c8e
 
 
31720d6
 
 
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
# Use a full Debian image with curl and Node.js support
FROM node:18-bullseye

# Set working directory
WORKDIR /app

# Install dependencies (fonts + dumb-init for signal handling)
RUN apt-get update && apt-get install -y \
    dumb-init \
    python3 \
    python3-pip \
    curl \
    jq \
    fonts-noto \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

# Install n8n globally
RUN npm install -g n8n

# Optional: timezone
ENV TZ=Australia/Melbourne

# Set environment variables (replace YOUR_URL)
ENV N8N_PORT=7860
ENV N8N_HOST=0.0.0.0
ENV WEBHOOK_URL=https://gordony2028-automation.hf.space

# Add basic auth for protection (change this!)
ENV N8N_BASIC_AUTH_ACTIVE=true
ENV N8N_BASIC_AUTH_USER=admin

# PostgreSQL DB
ENV DB_TYPE=postgresdb
ENV DB_POSTGRESDB_HOST=aws-0-ap-southeast-2.pooler.supabase.com
ENV DB_POSTGRESDB_PORT=5432
ENV DB_POSTGRESDB_DATABASE=postgres
ENV DB_POSTGRESDB_USER=postgre
ENV DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED=false

EXPOSE 7860

# Run n8n using dumb-init for signal support
ENTRYPOINT ["dumb-init", "--"]
CMD ["n8n"]