tcfly commited on
Commit
4de48b1
1 Parent(s): 8ddbbac

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -23
Dockerfile CHANGED
@@ -1,34 +1,26 @@
1
  FROM node:18-alpine
 
2
 
3
- RUN mkdir -p /data && mkdir -p /data/flowise && mkdir -p /data/flowise/logs && chmod -R 777 /data
4
- # Set home to the /data directory
5
- ENV HOME=/data
 
 
 
 
6
 
7
- WORKDIR $HOME/flowise
8
-
9
- RUN apk add --no-cache git
10
- RUN apk add --no-cache python3 py3-pip make g++
11
- # needed for pdfjs-dist
12
- RUN apk add --no-cache build-base cairo-dev pango-dev
13
-
14
- # Install Chromium
15
- RUN apk add --no-cache chromium
16
 
17
  ENV PUPPETEER_SKIP_DOWNLOAD=true
18
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
19
- ENV DATABASE_PATH=$HOME/flowise
20
- ENV APIKEY_PATH=$HOME/flowise
21
- ENV LOG_PATH=$HOME/flowise/logs
22
- ENV LOG_LEVEL=debug
23
- #ENV DEBUG=true
24
 
25
- # You can install a specific version like: flowise@1.0.0
26
  RUN npm install -g flowise
27
 
28
- RUN mkdir -p /usr/local/lib/node_modules/flowise && mkdir -p /usr/local/lib/node_modules/flowise/uploads && chmod -R 777 /usr/local/lib/node_modules/flowise
29
-
30
- USER 1000
31
 
32
- EXPOSE 3000
33
 
34
- CMD /bin/sh -c "sleep 3; flowise start"
 
1
  FROM node:18-alpine
2
+ USER root
3
 
4
+ # Arguments that can be passed at build time
5
+ ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
6
+ ARG BASE_PATH=/root/.flowise
7
+ ARG DATABASE_PATH=$BASE_PATH
8
+ ARG APIKEY_PATH=$BASE_PATH
9
+ ARG SECRETKEY_PATH=$BASE_PATH
10
+ ARG LOG_PATH=$BASE_PATH/logs
11
 
12
+ # Install dependencies
13
+ RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
 
 
 
 
 
 
 
14
 
15
  ENV PUPPETEER_SKIP_DOWNLOAD=true
16
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
 
 
 
 
 
17
 
18
+ # Install Flowise globally
19
  RUN npm install -g flowise
20
 
21
+ # Configure Flowise directories using the ARG
22
+ RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads && chmod -R 777 $LOG_PATH $FLOWISE_PATH
 
23
 
24
+ WORKDIR /data
25
 
26
+ CMD ["npx", "flowise", "start"]