Update Dockerfile
Browse files- Dockerfile +16 -19
Dockerfile
CHANGED
@@ -1,39 +1,36 @@
|
|
|
|
1 |
FROM node:18-slim
|
2 |
|
3 |
-
#
|
4 |
-
RUN apt-get update && apt-get install -y
|
5 |
git python3 python3-pip build-essential \
|
6 |
-
libcairo2-dev libpango1.0-dev chromium
|
7 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
-
#
|
10 |
ENV PUPPETEER_SKIP_DOWNLOAD=true \
|
11 |
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
|
12 |
-
|
13 |
|
14 |
-
#
|
15 |
RUN npm install -g [email protected]
|
16 |
RUN pip3 install numpy==1.26.4 --break-system-packages \
|
17 |
-
&& pip3 install chromadb==0.4.24
|
18 |
|
19 |
-
#
|
20 |
RUN mkdir -p /usr/local/lib/node_modules/flowise/logs \
|
21 |
&& chmod -R 777 /usr/local/lib/node_modules/flowise
|
22 |
|
23 |
-
#
|
24 |
WORKDIR /data
|
25 |
RUN mkdir -p /data/.flowise/logs /data/.flowise/storage /data/uploads /data/chroma \
|
26 |
&& chmod -R 777 /data
|
27 |
|
28 |
-
#
|
29 |
-
COPY flowise.json /data/flowise.json
|
30 |
|
31 |
-
#
|
32 |
-
EXPOSE 7860
|
33 |
|
34 |
-
#
|
35 |
-
CMD
|
36 |
-
--allow-cors '\''["*"]'\'' & \
|
37 |
-
while ! curl -s http://localhost:8000/api/v1/heartbeat >/dev/null; do \
|
38 |
-
echo "Waiting for Chroma API…"; sleep 1; done && \
|
39 |
-
npx flowise start'
|
|
|
1 |
+
# ---------- Base image -----------------------------------------------------
|
2 |
FROM node:18-slim
|
3 |
|
4 |
+
# ---------- OS packages ----------------------------------------------------
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
git python3 python3-pip build-essential \
|
7 |
+
libcairo2-dev libpango1.0-dev chromium \
|
8 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
9 |
|
10 |
+
# ---------- Environment ----------------------------------------------------
|
11 |
ENV PUPPETEER_SKIP_DOWNLOAD=true \
|
12 |
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
|
13 |
+
CHROMA_MODE=local # ← forces Flowise to start its embedded Chroma
|
14 |
|
15 |
+
# ---------- Node & Python deps --------------------------------------------
|
16 |
RUN npm install -g [email protected]
|
17 |
RUN pip3 install numpy==1.26.4 --break-system-packages \
|
18 |
+
&& pip3 install chromadb==0.4.24 --break-system-packages
|
19 |
|
20 |
+
# ---------- Prevent early-log crash ---------------------------------------
|
21 |
RUN mkdir -p /usr/local/lib/node_modules/flowise/logs \
|
22 |
&& chmod -R 777 /usr/local/lib/node_modules/flowise
|
23 |
|
24 |
+
# ---------- Persistent data dirs ------------------------------------------
|
25 |
WORKDIR /data
|
26 |
RUN mkdir -p /data/.flowise/logs /data/.flowise/storage /data/uploads /data/chroma \
|
27 |
&& chmod -R 777 /data
|
28 |
|
29 |
+
# ---------- Flowise configuration -----------------------------------------
|
30 |
+
COPY flowise.json /data/flowise.json # <- keep this file in the repo root
|
31 |
|
32 |
+
# ---------- Expose Flowise UI port ----------------------------------------
|
33 |
+
EXPOSE 7860
|
34 |
|
35 |
+
# ---------- Start Flowise (embedded Chroma auto-starts) --------------------
|
36 |
+
CMD ["npx", "flowise", "start"]
|
|
|
|
|
|
|
|