File size: 472 Bytes
b48d8da 402b573 2ce31a4 402b573 b48d8da | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #!/bin/sh
set -eu
mkdir -p /app/data/fulltext
(
attempts="${CCRD_INDEX_BUCKET_ATTEMPTS:-6}"
delay="${CCRD_INDEX_BUCKET_RETRY_SECONDS:-5}"
attempt=1
while ! python /app/prepare_fulltext_index.py; do
if [ -z "${CCRD_INDEX_BUCKET_DIR:-}" ] || [ "$attempt" -ge "$attempts" ]; then
python /app/build_fulltext_db.py
exit
fi
sleep "$delay"
attempt=$((attempt + 1))
done
) &
exec uvicorn app:app --host 0.0.0.0 --port 7860 --log-level info
|