Update Dockerfile
Browse files- Dockerfile +16 -8
Dockerfile
CHANGED
@@ -1,15 +1,26 @@
|
|
1 |
-
FROM node:
|
|
|
|
|
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=/
|
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 |
ARG BLOB_STORAGE_PATH=$BASE_PATH/storage
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
# Install dependencies
|
14 |
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
|
15 |
|
@@ -19,9 +30,6 @@ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
|
19 |
# Install Flowise globally
|
20 |
RUN npm install -g flowise
|
21 |
|
22 |
-
# Configure Flowise directories using the ARG
|
23 |
-
RUN mkdir -p $
|
24 |
-
|
25 |
-
WORKDIR /data
|
26 |
-
|
27 |
-
CMD ["npx", "flowise", "start"]
|
|
|
1 |
+
FROM node:20-alpine
|
2 |
+
# Create the /data directory with appropriate permissions
|
3 |
+
RUN mkdir -p /data && chmod -R 777 /data
|
4 |
USER root
|
5 |
|
6 |
# Arguments that can be passed at build time
|
7 |
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
|
8 |
+
ARG BASE_PATH=/data/.flowise
|
9 |
ARG DATABASE_PATH=$BASE_PATH
|
10 |
ARG APIKEY_PATH=$BASE_PATH
|
11 |
ARG SECRETKEY_PATH=$BASE_PATH
|
12 |
ARG LOG_PATH=$BASE_PATH/logs
|
13 |
ARG BLOB_STORAGE_PATH=$BASE_PATH/storage
|
14 |
|
15 |
+
# Set the ARGs as ENV
|
16 |
+
ENV FLOWISE_PATH=$FLOWISE_PATH
|
17 |
+
ENV BASE_PATH=$BASE_PATH
|
18 |
+
ENV DATABASE_PATH=$DATABASE_PATH
|
19 |
+
ENV APIKEY_PATH=$APIKEY_PATH
|
20 |
+
ENV SECRETKEY_PATH=$SECRETKEY_PATH
|
21 |
+
ENV LOG_PATH=$LOG_PATH
|
22 |
+
ENV BLOB_STORAGE_PATH=$BLOB_STORAGE_PATH
|
23 |
+
|
24 |
# Install dependencies
|
25 |
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
|
26 |
|
|
|
30 |
# Install Flowise globally
|
31 |
RUN npm install -g flowise
|
32 |
|
33 |
+
# # Configure Flowise directories using the ARG
|
34 |
+
RUN mkdir -p $FLOWISE_PATH/uploads && chmod -R 777 $FLOWISE_PATH
|
35 |
+
CMD ["sh", "-c", "mkdir -p $LOG_PATH && chmod -R 777 $LOG_PATH && npx flowise start"]
|
|
|
|
|
|