Spaces:
Running
Running
Download deploy/scripts/release.sh from Aynkhn/WorkPilot-AI: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/spaces/Aynkhn/WorkPilot-AI/resolve/main/deploy/scripts/release.sh
- Command line
-
hf download hf://spaces/Aynkhn/WorkPilot-AI/deploy/scripts/release.sh
-
curl -L -o release.sh https://huggingface.co/spaces/Aynkhn/WorkPilot-AI/resolve/main/deploy/scripts/release.sh
1.21 kB
| # Release step: runs ONCE per deploy, before any new api/worker instance starts | |
| # (Fly.io release_command, Railway preDeployCommand, ECS one-off task, compose "migrate"). | |
| # Uses the owner role (WP_OWNER_DATABASE_URL); the app role never runs migrations. | |
| # | |
| # 0. check-config: refuse development defaults (JWT secret, DB passwords, SSRF relaxations). | |
| # 1. check-deploy: refuse a release whose graph no longer has nodes that waiting runs are | |
| # paused in (LangGraph cannot resume them). Runs BEFORE migrating, so a refused release | |
| # changes nothing. Drain those runs (approve/reject them) or keep the nodes, then retry. | |
| # 2. alembic upgrade head. Migrations must be expand-only (additive) so the OLD release, | |
| # still serving while the new one starts (blue-green / rolling), keeps working. | |
| # 3. sync-tools: re-index pack tools for tool search. | |
| # 4. Optional (WP_RELEASE_SEED_DEMO=1): create the public demo tenant if missing (idempotent). | |
| set -eu | |
| cd "$(dirname "$0")/../.." | |
| python -m core.cli check-config | |
| python -m core.cli check-deploy | |
| alembic upgrade head | |
| python -m core.cli sync-tools | |
| if [ "${WP_RELEASE_SEED_DEMO:-0}" = "1" ]; then | |
| python -m core.cli seed-demo | |
| fi | |
| echo "release: ok" | |