Download entrypoint.sh from QBANK/OFTQUEST: direct link, hf CLI and curl.
- Browser
- Download file 887 Bytes
-
https://huggingface.co/spaces/QBANK/OFTQUEST/resolve/main/entrypoint.sh
- Command line
-
hf download hf://spaces/QBANK/OFTQUEST/entrypoint.sh
-
curl -L -o entrypoint.sh https://huggingface.co/spaces/QBANK/OFTQUEST/resolve/main/entrypoint.sh
887 Bytes
| set -e | |
| export DB_PATH="${DB_PATH:-/app/data/medmembers.db}" | |
| # Always rebuild database to ensure secrets (ADMIN_EMAIL/PASSWORD) are applied | |
| echo "Building database with current environment..." | |
| rm -f "$DB_PATH" | |
| python import_data.py | |
| echo "Database built successfully." | |
| # Import media files index if available (Telegram video references) | |
| if [ -f "/app/data/media_files.json" ]; then | |
| echo "Importing media files index..." | |
| python telegram_uploader.py --import-json /app/data/media_files.json | |
| echo "Media files imported." | |
| elif [ -f "/app/media_files.json" ]; then | |
| echo "Importing media files index..." | |
| python telegram_uploader.py --import-json /app/media_files.json | |
| echo "Media files imported." | |
| fi | |
| echo "Starting MedMembers OFT server on port ${PORT:-7860}..." | |
| exec gunicorn --worker-class eventlet -w 1 -b "0.0.0.0:${PORT:-7860}" --timeout 120 app:app | |