|
|
|
FROM node:20-alpine |
|
|
|
RUN npm i -g pnpm && \ |
|
|
|
mkdir -p /data && chmod -R 777 /data && \ |
|
|
|
mkdir -p /usr/local/lib/node_modules/flowise && chmod -R 777 /usr/local/lib/node_modules/flowise && \ |
|
|
|
apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium |
|
|
|
USER node |
|
|
|
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise |
|
ARG BASE_PATH=/data/.flowise |
|
ENV FLOWISE_PATH=$FLOWISE_PATH \ |
|
BASE_PATH=$BASE_PATH \ |
|
DATABASE_PATH=$BASE_PATH \ |
|
APIKEY_PATH=$BASE_PATH \ |
|
SECRETKEY_PATH=$BASE_PATH \ |
|
LOG_PATH=$BASE_PATH/logs \ |
|
PUPPETEER_SKIP_DOWNLOAD=true \ |
|
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser |
|
|
|
RUN mkdir -p /home/node/app && chmod -R 777 /home/node/app |
|
WORKDIR /home/node/app |
|
|
|
RUN \ |
|
|
|
git clone https://github.com/FlowiseAI/Flowise.git . && \ |
|
|
|
pnpm install && \ |
|
|
|
pnpm build |
|
|
|
RUN sh -c 'mkdir -p $LOG_PATH && chmod -R 777 $LOG_PATH && \ |
|
mkdir -p $FLOWISE_PATH/uploads && chmod -R 777 $FLOWISE_PATH/uploads' |
|
|
|
|
|
CMD pnpm start |
|
|