EryriLabs commited on
Commit
76d1bf3
·
verified ·
1 Parent(s): 464558e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -9
Dockerfile CHANGED
@@ -1,4 +1,5 @@
1
  FROM node:18-alpine
 
2
  USER root
3
 
4
  # Arguments that can be passed at build time
@@ -8,26 +9,33 @@ 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
  ARG FLOWISE_USERNAME
13
  ARG FLOWISE_PASSWORD
14
 
15
-
16
- # Install dependencies
17
- RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
18
-
19
  ENV PUPPETEER_SKIP_DOWNLOAD=true
20
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
21
  ENV DISABLE_FLOWISE_TELEMETRY=true
 
 
 
 
22
 
23
- # Install Flowise globally
24
- RUN npm install -g flowise
 
 
25
 
26
- # Configure Flowise directories using the ARG
27
- RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads && chmod -R 777 $LOG_PATH $FLOWISE_PATH
 
28
 
 
29
  WORKDIR /data
30
 
 
 
31
 
 
32
  CMD ["npx", "flowise", "start"]
33
 
 
1
  FROM node:18-alpine
2
+
3
  USER root
4
 
5
  # Arguments that can be passed at build time
 
9
  ARG APIKEY_PATH=$BASE_PATH
10
  ARG SECRETKEY_PATH=$BASE_PATH
11
  ARG LOG_PATH=$BASE_PATH/logs
 
12
  ARG FLOWISE_USERNAME
13
  ARG FLOWISE_PASSWORD
14
 
15
+ # Set environment variables
 
 
 
16
  ENV PUPPETEER_SKIP_DOWNLOAD=true
17
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
18
  ENV DISABLE_FLOWISE_TELEMETRY=true
19
+ ENV NODE_ENV=production
20
+
21
+ # Install dependencies
22
+ RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
23
 
24
+ # Clean npm cache and install the latest Flowise globally
25
+ RUN npm cache clean --force && \
26
+ npm install -g npm@latest && \
27
+ npm install -g flowise@latest
28
 
29
+ # Configure Flowise directories
30
+ RUN mkdir -p $LOG_PATH $DATABASE_PATH $APIKEY_PATH $SECRETKEY_PATH $FLOWISE_PATH/uploads
31
+ RUN chmod -R 777 $LOG_PATH $DATABASE_PATH $APIKEY_PATH $SECRETKEY_PATH $FLOWISE_PATH
32
 
33
+ # Set working directory
34
  WORKDIR /data
35
 
36
+ # Expose default Flowise port
37
+ EXPOSE 3000
38
 
39
+ # Start Flowise
40
  CMD ["npx", "flowise", "start"]
41