Spaces:
Build error
Build error
Initial push
Browse files- Dockerfile +37 -0
Dockerfile
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM node:18-alpine
|
2 |
+
USER root
|
3 |
+
|
4 |
+
# Arguments that can be passed at build time
|
5 |
+
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
|
6 |
+
ARG PORT=7860
|
7 |
+
ARG PASSPHRASE=
|
8 |
+
ARG DATABASE_PATH=/root/.flowise
|
9 |
+
ARG APIKEY_PATH=/root/.flowise
|
10 |
+
ARG SECRETKEY_PATH=/root/.flowise
|
11 |
+
ARG LOG_PATH=/root/.flowise/logs
|
12 |
+
|
13 |
+
# Install dependencies
|
14 |
+
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
|
15 |
+
|
16 |
+
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
17 |
+
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
18 |
+
|
19 |
+
# Set environment variables using the arguments
|
20 |
+
ENV PORT=$PORT
|
21 |
+
ENV PASSPHRASE=$PASSPHRASE
|
22 |
+
ENV DATABASE_PATH=$DATABASE_PATH
|
23 |
+
ENV APIKEY_PATH=$APIKEY_PATH
|
24 |
+
ENV SECRETKEY_PATH=$SECRETKEY_PATH
|
25 |
+
ENV LOG_PATH=$LOG_PATH
|
26 |
+
|
27 |
+
# Install Flowise globally
|
28 |
+
RUN npm install -g flowise
|
29 |
+
|
30 |
+
# Configure Flowise directories using the ARG
|
31 |
+
RUN mkdir -p $FLOWISE_PATH && chmod -R 777 $FLOWISE_PATH
|
32 |
+
RUN mkdir -p $LOG_PATH && chmod -R 777 $LOG_PATH
|
33 |
+
RUN mkdir -p $FLOWISE_PATH/uploads && chmod -R 777 $FLOWISE_PATH/uploads
|
34 |
+
|
35 |
+
WORKDIR /data
|
36 |
+
|
37 |
+
CMD ["npx", "flowise", "start"]
|