Spaces:
Sleeping
Sleeping
lucianotonet
commited on
Commit
•
1717fdd
1
Parent(s):
34b7a59
Update Dockerfile
Browse files- Dockerfile +13 -13
Dockerfile
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
FROM node:18-alpine
|
2 |
-
|
3 |
USER root
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
9 |
|
10 |
-
# Install
|
11 |
-
RUN apk add --no-cache chromium
|
12 |
|
13 |
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
14 |
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
15 |
|
16 |
-
#
|
17 |
RUN npm install -g flowise
|
18 |
|
19 |
-
|
20 |
-
RUN mkdir -p /
|
21 |
-
RUN touch /usr/local/lib/node_modules/flowise/api.json && chmod 777 /usr/local/lib/node_modules/flowise/api.json
|
22 |
-
RUN touch /usr/local/lib/node_modules/flowise/encryption.key && chmod 777 /usr/local/lib/node_modules/flowise/encryption.key
|
23 |
|
24 |
WORKDIR /data
|
25 |
|
26 |
-
CMD ["npx", "flowise", "start"]
|
|
|
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 BASE_PATH=/root/.flowise
|
7 |
+
ARG DATABASE_PATH=$BASE_PATH
|
8 |
+
ARG APIKEY_PATH=$BASE_PATH
|
9 |
+
ARG SECRETKEY_PATH=$BASE_PATH
|
10 |
+
ARG LOG_PATH=$BASE_PATH/logs
|
11 |
|
12 |
+
# Install dependencies
|
13 |
+
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
|
14 |
|
15 |
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
16 |
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
17 |
|
18 |
+
# Install Flowise globally
|
19 |
RUN npm install -g flowise
|
20 |
|
21 |
+
# Configure Flowise directories using the ARG
|
22 |
+
RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads && chmod -R 777 $LOG_PATH $FLOWISE_PATH
|
|
|
|
|
23 |
|
24 |
WORKDIR /data
|
25 |
|
26 |
+
CMD ["npx", "flowise", "start"]
|