Spaces:
Runtime error
Runtime error
Update start.sh
Browse files
start.sh
CHANGED
|
@@ -1,18 +1,11 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
set -e
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
if [ -f "/app/server/data/freeapi.db" ]; then
|
| 10 |
-
echo "Database file detected, running restore..."
|
| 11 |
-
python3 /app/scripts/restore_from_dataset.py
|
| 12 |
-
break
|
| 13 |
-
fi
|
| 14 |
-
sleep 1
|
| 15 |
-
done
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
set -e
|
| 3 |
|
| 4 |
+
echo "==> Running database restore..."
|
| 5 |
+
python3 /app/scripts/restore_from_dataset.py
|
| 6 |
|
| 7 |
+
echo "==> Syncing Bailian models (first boot)..."
|
| 8 |
+
python3 /app/scripts/sync_bailian_models.py || echo "Warning: model sync failed, will retry later via cron"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
echo "==> Starting supervisor..."
|
| 11 |
+
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|