Spaces:
Running
Running
FROM node:18-alpine | |
USER root | |
# Arguments that can be passed at build time | |
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise | |
ARG BASE_PATH=/data/.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=$FLOWISE_USERNAME | |
ARG FLOWISE_PASSWORD=$FLOWISE_PASSWORD | |
# Set the ARGs as ENV | |
ENV FLOWISE_PATH=$FLOWISE_PATH | |
ENV BASE_PATH=$BASE_PATH | |
ENV DATABASE_PATH=$DATABASE_PATH | |
ENV APIKEY_PATH=$APIKEY_PATH | |
ENV SECRETKEY_PATH=$SECRETKEY_PATH | |
ENV LOG_PATH=$LOG_PATH | |
ENV FLOWISE_USERNAME=$FLOWISE_USERNAME | |
ENV FLOWISE_PASSWORD=$FLOWISE_PASSWORD | |
# 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 | |
#RUN npm install -g flowise@1.3.4 | |
#RUN npm install -g flowise@1.6.4 | |
RUN npm install -g flowise@1.8.4 | |
# # Configure Flowise directories using the ARG | |
RUN mkdir -p $FLOWISE_PATH/uploads && chmod -R 777 $FLOWISE_PATH | |
CMD ["sh", "-c", "mkdir -p $LOG_PATH && chmod -R 777 $LOG_PATH && npx flowise start"] | |