baoyin2024 commited on
Commit
831947f
·
verified ·
1 Parent(s): 7cd55fc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -10
Dockerfile CHANGED
@@ -25,37 +25,28 @@ ARG DB_POSTGRESDB_USER=$DB_POSTGRESDB_USER
25
  ARG DB_POSTGRESDB_PASSWORD=$DB_POSTGRESDB_PASSWORD
26
 
27
  # Install system dependencies
28
- RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium postgresql-client ffmpeg fontconfig dejavu-fonts yt-dlp
29
-
30
  # Install custom fonts
31
  RUN mkdir -p /usr/share/fonts/truetype/custom
32
  COPY ./fonts/HanyiSentyPagoda_Regular.ttf /usr/share/fonts/truetype/custom/
33
  RUN chmod 644 /usr/share/fonts/truetype/custom/HanyiSentyPagoda_Regular.ttf # 确保字体文件具有读取权限
34
  RUN fc-cache -f -v
35
-
36
  # Set environment variables
37
  ENV PUPPETEER_SKIP_DOWNLOAD=true
38
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
39
-
40
  # Install n8n globally
41
  RUN npm install -g [email protected]
42
-
43
  # Create necessary directories
44
  RUN mkdir -p $DATABASE_PATH $CONFIG_PATH $WORKFLOWS_PATH $LOGS_PATH
45
-
46
  # Chown the directories to the n8n user (if n8n has a specific user)
47
  # If n8n doesn't have a specific user, you can remove this section
48
  RUN addgroup -g 1000 n8n && \
49
  adduser -u 1000 -G n8n -s /bin/sh -D n8n
50
-
51
  RUN chown -R n8n:n8n $BASE_PATH
52
-
53
  # Switch to the n8n user. If n8n doesn't have a user, remove this.
54
  USER n8n
55
-
56
  # Set working directory
57
  WORKDIR /data
58
-
59
  # Start n8n
60
  CMD ["n8n", "start"]
61
 
 
25
  ARG DB_POSTGRESDB_PASSWORD=$DB_POSTGRESDB_PASSWORD
26
 
27
  # Install system dependencies
28
+ RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium postgresql-client ffmpeg fontconfig font-dejavu yt-dlp
 
29
  # Install custom fonts
30
  RUN mkdir -p /usr/share/fonts/truetype/custom
31
  COPY ./fonts/HanyiSentyPagoda_Regular.ttf /usr/share/fonts/truetype/custom/
32
  RUN chmod 644 /usr/share/fonts/truetype/custom/HanyiSentyPagoda_Regular.ttf # 确保字体文件具有读取权限
33
  RUN fc-cache -f -v
 
34
  # Set environment variables
35
  ENV PUPPETEER_SKIP_DOWNLOAD=true
36
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
 
37
  # Install n8n globally
38
  RUN npm install -g [email protected]
 
39
  # Create necessary directories
40
  RUN mkdir -p $DATABASE_PATH $CONFIG_PATH $WORKFLOWS_PATH $LOGS_PATH
 
41
  # Chown the directories to the n8n user (if n8n has a specific user)
42
  # If n8n doesn't have a specific user, you can remove this section
43
  RUN addgroup -g 1000 n8n && \
44
  adduser -u 1000 -G n8n -s /bin/sh -D n8n
 
45
  RUN chown -R n8n:n8n $BASE_PATH
 
46
  # Switch to the n8n user. If n8n doesn't have a user, remove this.
47
  USER n8n
 
48
  # Set working directory
49
  WORKDIR /data
 
50
  # Start n8n
51
  CMD ["n8n", "start"]
52