Upload 4 files
Browse files- Dockerfile +1 -21
- README.md +9 -6
- start.sh +34 -0
Dockerfile
CHANGED
@@ -42,24 +42,4 @@ USER 1000:1000
|
|
42 |
EXPOSE 7860 8000
|
43 |
|
44 |
# ---------- Start: Chroma β wait β Flowise ---------------------------------
|
45 |
-
|
46 |
-
chroma run \
|
47 |
-
--path /data/chroma \
|
48 |
-
--host 0.0.0.0 \
|
49 |
-
--port 8000 \
|
50 |
-
& \
|
51 |
-
echo "--- Waiting for Chroma API ---"; \
|
52 |
-
while ! curl -v http://localhost:8000/api/v2/heartbeat; do \
|
53 |
-
echo "[DEBUG] Chroma not ready yet. Retrying..."; \
|
54 |
-
netstat -tulnp || ss -tulnp || true; \
|
55 |
-
sleep 1; \
|
56 |
-
done; \
|
57 |
-
echo "--- Chroma API is up ---"; \
|
58 |
-
echo "[DEBUG] Testing Chroma collections endpoint:"; \
|
59 |
-
curl -v http://localhost:8000/api/v2/collections || true; \
|
60 |
-
echo "[DEBUG] Environment variables:"; \
|
61 |
-
printenv | grep CHROMA || true; \
|
62 |
-
echo "[DEBUG] Process list:"; \
|
63 |
-
ps aux; \
|
64 |
-
echo "[DEBUG] Flowise will start now."; \
|
65 |
-
npx flowise start'
|
|
|
42 |
EXPOSE 7860 8000
|
43 |
|
44 |
# ---------- Start: Chroma β wait β Flowise ---------------------------------
|
45 |
+
ENTRYPOINT ["/start.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
---
|
2 |
title: Flowise
|
|
|
3 |
emoji: π
|
4 |
colorFrom: gray
|
5 |
colorTo: green
|
@@ -18,16 +19,18 @@ This Space uses **Flowise with local Chroma DB and SQLite** to store your docume
|
|
18 |
- **Chat history and upsert logs** β `/data/flowise.db`
|
19 |
- **Configuration file** β `flowise.json`
|
20 |
|
21 |
-
These are stored in a special folder called `/data` which survives
|
22 |
|
23 |
---
|
24 |
|
25 |
-
## β οΈ Do Not Edit or Rebuild
|
26 |
|
27 |
-
- Any code or README change deletes all your data.
|
28 |
-
- Do **not** commit changes once youβve started using the Space.
|
29 |
-
- If you accidentally
|
30 |
-
-
|
|
|
|
|
31 |
|
32 |
---
|
33 |
|
|
|
1 |
---
|
2 |
title: Flowise
|
3 |
+
last update: 21.05.2025
|
4 |
emoji: π
|
5 |
colorFrom: gray
|
6 |
colorTo: green
|
|
|
19 |
- **Chat history and upsert logs** β `/data/flowise.db`
|
20 |
- **Configuration file** β `flowise.json`
|
21 |
|
22 |
+
These are stored in a special folder called `/data` which **survives sleep/awaken cycles but will not restart or rebuild**.
|
23 |
|
24 |
---
|
25 |
|
26 |
+
## β οΈ Do Not Edit or Restart or Rebuild β οΈ
|
27 |
|
28 |
+
- π¨Any code or README change deletes all your data.
|
29 |
+
- π¨Do **not** commit any changes once youβve started using the Space.
|
30 |
+
- π¨ If you accidentally restart, all documents and work are lost
|
31 |
+
- π¨If you accidentally rebuild, all documents and work are lost.
|
32 |
+
- Rebuilds may also occur if Hugging Face updates backend infrastructure.
|
33 |
+
- β
**Back up your flows, credentials and any other data regularly.**
|
34 |
|
35 |
---
|
36 |
|
start.sh
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
set -e
|
3 |
+
|
4 |
+
# Create Chroma data directory if missing
|
5 |
+
if [ ! -d "/data/chroma" ]; then
|
6 |
+
echo "[DEBUG] Creating /data/chroma"
|
7 |
+
mkdir -p /data/chroma
|
8 |
+
fi
|
9 |
+
|
10 |
+
# Create Flowise log directory if missing
|
11 |
+
if [ ! -d "/data/.flowise/logs" ]; then
|
12 |
+
echo "[DEBUG] Creating /data/.flowise/logs"
|
13 |
+
mkdir -p /data/.flowise/logs
|
14 |
+
fi
|
15 |
+
|
16 |
+
# Start Chroma in the background
|
17 |
+
echo "[DEBUG] Starting Chroma..."
|
18 |
+
chroma run --path /data/chroma --host 0.0.0.0 --port 8000 &
|
19 |
+
|
20 |
+
# Wait for Chroma to become ready
|
21 |
+
echo "--- Waiting for Chroma API ---"
|
22 |
+
until curl -s http://localhost:8000/api/v2/heartbeat >/dev/null; do
|
23 |
+
echo "[DEBUG] Chroma not ready yet. Retrying..."
|
24 |
+
sleep 1
|
25 |
+
done
|
26 |
+
echo "--- Chroma API is up ---"
|
27 |
+
|
28 |
+
# Check collections
|
29 |
+
echo "[DEBUG] Testing Chroma collections endpoint:"
|
30 |
+
curl -s http://localhost:8000/api/v2/collections || true
|
31 |
+
|
32 |
+
# Start Flowise
|
33 |
+
echo "[DEBUG] Starting Flowise..."
|
34 |
+
npx flowise start
|