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

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -46
Dockerfile CHANGED
@@ -1,57 +1,23 @@
1
- FROM node:20-slim
2
 
3
- # Install necessary tools
4
- RUN apt-get update && apt-get install -y \
5
- postgresql-client \
6
- python3 \
7
- python3-pip \
8
- curl \
9
- net-tools \
10
- ca-certificates \
11
- && apt-get clean
12
-
13
- # Install timezone data (for Debian/Ubuntu based images)
14
- RUN apt-get update && apt-get install -y tzdata && rm -rf /var/lib/apt/lists/*
15
 
16
- # Set timezone multiple ways to ensure it takes
 
 
 
17
  ENV TZ=Australia/Melbourne
18
- RUN ln -snf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
19
- RUN echo "Australia/Melbourne" > /etc/timezone
20
-
21
- # Verify timezone is set (optional - for debugging)
22
- RUN date
23
-
24
-
25
- # Set working directory
26
- WORKDIR /app
27
 
28
- # Install n8n globally
29
- RUN npm install -g n8n
30
-
31
- # Debug - check if timezone is set correctly
32
- RUN echo "Timezone set to:" && cat /etc/timezone
33
- RUN echo "Current time:" && date
34
-
35
- # Set environment variables (non-sensitive only)
36
  ENV DB_TYPE=postgresdb
37
  ENV DB_POSTGRESDB_HOST=aws-0-ap-southeast-2.pooler.supabase.com
38
  ENV DB_POSTGRESDB_PORT=5432
39
- ENV DB_POSTGRESDB_USER=postgres.dcyzjvvdpxsewlupdkap
40
  ENV DB_POSTGRESDB_DATABASE=postgres
41
- ENV N8N_USER_MANAGEMENT_DISABLED=true
42
- ENV N8N_BASIC_AUTH_ACTIVE=true
43
- ENV NBN_BASIC_AUTH_USER=admin
44
- ENV N8N_PORT=7860
45
- ENV N8N_HOST=0.0.0.0
46
- ENV N8N_PROTOCOL=http
47
- ENV N8N_RUNNERS_ENABLED=true
48
- # ENV WEBHOOK_URL=https://gordony2028-automation.hf.space
49
 
50
- # Hugging Face listens on this port
51
  EXPOSE 7860
52
 
53
- # Copy entry script
54
- COPY start.sh /start.sh
55
- RUN chmod +x /start.sh
56
-
57
- CMD ["/start.sh"]
 
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"]