flowise / Dockerfile
cellithorpe's picture
Update Dockerfile
d0fe907 verified
raw
history blame
1.09 kB
FROM node:18-alpine
USER root
# Arguments that can be passed at build time
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
# changed base from /root to /data
ENV BASE_PATH=/data/.flowise
ENV DATABASE_PATH=$BASE_PATH
ENV APIKEY_PATH=$BASE_PATH
ENV SECRETKEY_PATH=$BASE_PATH
ARG LOG_PATH=$BASE_PATH/logs
ARG BLOB_STORAGE_PATH=$BASE_PATH/storage
ENV FLOWISE_USERNAME=${admin}
ENV FLOWISE_PASSWORD=${1234}
# Install dependencies
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
# Install Flowise globally, pinning the version. To upgrade versions, change this line.
RUN npm install -g flowise@"~1.8.1"
# Configure Flowise directories using the ARG
RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads && chmod -R 777 $LOG_PATH $FLOWISE_PATH
# Need to give permission for database folder as well
RUN mkdir -p $DATABASE_PATH && chmod -R 777 $DATABASE_PATH
WORKDIR /data
# configuration for deploying on huggingface
ENV PORT=7860
CMD ["npx", "flowise", "start"]