File size: 1,109 Bytes
c4b654c
76d1bf3
e2e77ff
 
 
 
 
 
 
 
 
d213e14
 
b3863ba
76d1bf3
e2e77ff
 
464558e
76d1bf3
 
 
 
e2e77ff
76d1bf3
 
 
 
e2e77ff
76d1bf3
 
 
e2e77ff
76d1bf3
e2e77ff
 
76d1bf3
 
c49c15e
76d1bf3
e2e77ff
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM node:20-alpine

USER root

# Arguments that can be passed at build time
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
ARG BASE_PATH=/root/.flowise
ARG DATABASE_PATH=$BASE_PATH
ARG APIKEY_PATH=$BASE_PATH
ARG SECRETKEY_PATH=$BASE_PATH
ARG LOG_PATH=$BASE_PATH/logs
ARG FLOWISE_USERNAME
ARG FLOWISE_PASSWORD

# Set environment variables
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV DISABLE_FLOWISE_TELEMETRY=true
ENV NODE_ENV=production

# Install dependencies
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium

# Clean npm cache and install the latest Flowise globally
RUN npm cache clean --force && \
    npm install -g npm@latest && \
    npm install -g flowise@latest

# Configure Flowise directories
RUN mkdir -p $LOG_PATH $DATABASE_PATH $APIKEY_PATH $SECRETKEY_PATH $FLOWISE_PATH/uploads
RUN chmod -R 777 $LOG_PATH $DATABASE_PATH $APIKEY_PATH $SECRETKEY_PATH $FLOWISE_PATH

# Set working directory
WORKDIR /data

# Expose default Flowise port
EXPOSE 3000

# Start Flowise
CMD ["npx", "flowise", "start"]