itbetyar commited on
Commit
12706cd
·
verified ·
1 Parent(s): 51ad149

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -1,12 +1,9 @@
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
  ARG BLOB_STORAGE_PATH=$BASE_PATH/storage
12
 
@@ -20,8 +17,11 @@ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
20
  RUN npm install -g flowise
21
 
22
  # Configure Flowise directories using the ARG
23
- RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads && chmod -R 777 $LOG_PATH $FLOWISE_PATH
24
 
25
  WORKDIR /data
26
 
 
 
 
27
  CMD ["npx", "flowise", "start"]
 
 
 
 
1
  # Arguments that can be passed at build time
2
  ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
3
  ARG BASE_PATH=/root/.flowise
4
+ ARG DATABASE_PATH=$BASE_PATH/database
5
+ ARG APIKEY_PATH=$BASE_PATH/apikeys
6
+ ARG SECRETKEY_PATH=$BASE_PATH/secretkeys
7
  ARG LOG_PATH=$BASE_PATH/logs
8
  ARG BLOB_STORAGE_PATH=$BASE_PATH/storage
9
 
 
17
  RUN npm install -g flowise
18
 
19
  # Configure Flowise directories using the ARG
20
+ RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads $DATABASE_PATH $APIKEY_PATH $SECRETKEY_PATH $BLOB_STORAGE_PATH && chmod -R 777 $BASE_PATH $FLOWISE_PATH
21
 
22
  WORKDIR /data
23
 
24
+ # Ensure persistent storage for Hugging Face Spaces
25
+ VOLUME ["$DATABASE_PATH", "$APIKEY_PATH", "$SECRETKEY_PATH", "$LOG_PATH", "$BLOB_STORAGE_PATH"]
26
+
27
  CMD ["npx", "flowise", "start"]