sam12345324 commited on
Commit
63ba249
·
verified ·
1 Parent(s): 432c9f2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -13
Dockerfile CHANGED
@@ -19,13 +19,6 @@ ARG WEBHOOK_URL=$WEBHOOK_URL
19
  ARG GENERIC_TIMEZONE=$GENERIC_TIMEZONE
20
  ARG TZ=$TZ
21
  ARG N8N_ENCRYPTION_KEY=$N8N_ENCRYPTION_KEY
22
- ARG DB_TYPE=$DB_TYPE
23
- ARG DB_POSTGRESDB_SCHEMA=$DB_POSTGRESDB_SCHEMA
24
- ARG DB_POSTGRESDB_HOST=$DB_POSTGRESDB_HOST
25
- ARG DB_POSTGRESDB_DATABASE=$DB_POSTGRESDB_DATABASE
26
- ARG DB_POSTGRESDB_PORT=$DB_POSTGRESDB_PORT
27
- ARG DB_POSTGRESDB_USER=$DB_POSTGRESDB_USER
28
- ARG DB_POSTGRESDB_PASSWORD=$DB_POSTGRESDB_PASSWORD
29
 
30
  # Install system dependencies required by sharp, imagemagick, graphicsmagick, and other image processing tools
31
  RUN apt update && apt install -y \
@@ -43,7 +36,6 @@ RUN apt update && apt install -y \
43
  libgif-dev \
44
  librsvg2-dev \
45
  chromium \
46
- postgresql-client \
47
  libvips-dev \
48
  libvips-tools \
49
  imagemagick \
@@ -68,9 +60,6 @@ RUN npm install -g n8n
68
  # Set working directory Hugging Face will use
69
  WORKDIR /workspace
70
 
71
- # Copy any required files into container if needed (skip if using online editor)
72
- # COPY . .
73
-
74
  # Expose default port
75
  EXPOSE 7860
76
 
@@ -81,5 +70,10 @@ ENV GENERIC_TIMEZONE=UTC
81
  # Enable verbose logging for sharp
82
  ENV SHARP_VERBOSE=true
83
 
84
- # Start n8n
85
- CMD ["n8n", "start"]
 
 
 
 
 
 
19
  ARG GENERIC_TIMEZONE=$GENERIC_TIMEZONE
20
  ARG TZ=$TZ
21
  ARG N8N_ENCRYPTION_KEY=$N8N_ENCRYPTION_KEY
 
 
 
 
 
 
 
22
 
23
  # Install system dependencies required by sharp, imagemagick, graphicsmagick, and other image processing tools
24
  RUN apt update && apt install -y \
 
36
  libgif-dev \
37
  librsvg2-dev \
38
  chromium \
 
39
  libvips-dev \
40
  libvips-tools \
41
  imagemagick \
 
60
  # Set working directory Hugging Face will use
61
  WORKDIR /workspace
62
 
 
 
 
63
  # Expose default port
64
  EXPOSE 7860
65
 
 
70
  # Enable verbose logging for sharp
71
  ENV SHARP_VERBOSE=true
72
 
73
+ # Configure n8n to use SQLite (database stored in /workspace, persistent in HF Spaces)
74
+ ENV DB_TYPE=sqlite
75
+ ENV DB_SQLITE_VACUUM_ON_STARTUP=true
76
+ ENV DB_SQLITE_DATABASE=/workspace/database.sqlite
77
+
78
+ # Start n8n with tunnel enabled (to bypass Hugging Face networking)
79
+ CMD ["n8n", "start", "--tunnel"]