|
#!/usr/bin/env sh |
|
echo "step 0 is ready" |
|
|
|
export $(grep -v '^#' /app/.env | xargs) |
|
echo "Loaded environment variables from .env" |
|
|
|
|
|
python -m app.initializer |
|
echo "step 1 is ready" |
|
|
|
|
|
rm -rf ./database/* |
|
qdrant --config-path config.yaml & |
|
echo "step 2 is ready" |
|
|
|
for i in {1..10}; do |
|
if curl -s http://localhost:6333/healthz | grep -q "ok"; then |
|
echo "Qdrant is ready!" |
|
break |
|
fi |
|
echo "Waiting for Qdrant..." |
|
sleep 1 |
|
done |
|
echo "step 3 is ready" |
|
|
|
python -m app.automigration |
|
echo "step 4 is ready" |
|
|
|
|
|
uvicorn app.api.api:api --host 0.0.0.0 --port 7860 & |
|
echo "step 5 is ready" |
|
|
|
|
|
for i in {1..10}; do |
|
if curl -s http://localhost:7860/health | grep -q "ok"; then |
|
echo "Uvicorn is ready!" |
|
break |
|
fi |
|
echo "Waiting for uvicorn..." |
|
sleep 1 |
|
done |
|
|
|
|
|
tail -f /dev/null |
|
|