gordony2028 commited on
Commit
31720d6
·
verified ·
1 Parent(s): ddd248f

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -10
Dockerfile CHANGED
@@ -1,23 +1,44 @@
1
- FROM n8nio/n8n:latest
 
2
 
3
- # Optional basic auth
4
- ENV N8N_BASIC_AUTH_ACTIVE=true
5
- ENV N8N_BASIC_AUTH_USER=admin
6
 
7
- # Required n8n config
8
- ENV N8N_HOST=0.0.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ENV N8N_PORT=7860
 
10
  ENV WEBHOOK_URL=https://gordony2028-automation.hf.space
11
- ENV TZ=Australia/Melbourne
12
 
13
- # PostgreSQL config from Supabase
 
 
 
 
14
  ENV DB_TYPE=postgresdb
15
  ENV DB_POSTGRESDB_HOST=aws-0-ap-southeast-2.pooler.supabase.com
16
  ENV DB_POSTGRESDB_PORT=5432
17
  ENV DB_POSTGRESDB_DATABASE=postgres
18
  ENV DB_POSTGRESDB_USER=postgre
19
- ENV DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED=false
20
 
21
  EXPOSE 7860
22
 
23
- CMD ["n8n", "start"]
 
 
 
1
+ # Use a full Debian image with curl and Node.js support
2
+ FROM node:18-bullseye
3
 
4
+ # Set working directory
5
+ WORKDIR /app
 
6
 
7
+ # Install dependencies (fonts + dumb-init for signal handling)
8
+ RUN apt-get update && apt-get install -y \
9
+ dumb-init \
10
+ python3 \
11
+ python3-pip \
12
+ curl \
13
+ jq \
14
+ fonts-noto \
15
+ && apt-get clean \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ # Install n8n globally
19
+ RUN npm install -g n8n
20
+
21
+ # Optional: timezone
22
+ ENV TZ=Australia/Melbourne
23
+
24
+ # Set environment variables (replace YOUR_URL)
25
  ENV N8N_PORT=7860
26
+ ENV N8N_HOST=0.0.0.0
27
  ENV WEBHOOK_URL=https://gordony2028-automation.hf.space
 
28
 
29
+ # Add basic auth for protection (change this!)
30
+ ENV N8N_BASIC_AUTH_ACTIVE=true
31
+ ENV N8N_BASIC_AUTH_USER=admin
32
+
33
+ # PostgreSQL DB
34
  ENV DB_TYPE=postgresdb
35
  ENV DB_POSTGRESDB_HOST=aws-0-ap-southeast-2.pooler.supabase.com
36
  ENV DB_POSTGRESDB_PORT=5432
37
  ENV DB_POSTGRESDB_DATABASE=postgres
38
  ENV DB_POSTGRESDB_USER=postgre
 
39
 
40
  EXPOSE 7860
41
 
42
+ # Run n8n using dumb-init for signal support
43
+ ENTRYPOINT ["dumb-init", "--"]
44
+ CMD ["n8n"]