File size: 890 Bytes
2846e91 f75574b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
#!/bin/bash
set -e
# Create Chroma data directory if missing
if [ ! -d "/data/chroma" ]; then
echo "[DEBUG] Creating /data/chroma"
mkdir -p /data/chroma
fi
# Create Flowise log directory if missing
if [ ! -d "/data/.flowise/logs" ]; then
echo "[DEBUG] Creating /data/.flowise/logs"
mkdir -p /data/.flowise/logs
fi
# Start Chroma in the background
echo "[DEBUG] Starting Chroma..."
chroma run --path /data/chroma --host 0.0.0.0 --port 8000 &
# Wait for Chroma to become ready
echo "--- Waiting for Chroma API ---"
until curl -s http://localhost:8000/api/v2/heartbeat >/dev/null; do
echo "[DEBUG] Chroma not ready yet. Retrying..."
sleep 1
done
echo "--- Chroma API is up ---"
# Check collections
echo "[DEBUG] Testing Chroma collections endpoint:"
curl -s http://localhost:8000/api/v2/collections || true
# Start Flowise
echo "[DEBUG] Starting Flowise..."
npx flowise start |