feat(admin): apix-admin UI at admin.api-index.org
Deploy to Production / deploy (push) Failing after 47s
Deploy to Production / deploy (push) Failing after 47s
Internal maintainer dashboard: global stats, sandbox list with
tier-filter and pagination, sandbox drill-down with D3 world map,
tier-promotion form. API-key auth via HttpOnly cookie. Port 8084,
rolling a/b deploy alongside the existing service pairs.
- apix-common: AdminSandboxSummary, AdminSandboxListResponse, AdminStatsResponse DTOs
- apix-registry: AdminResource (4 endpoints), SandboxService.listAllSandboxes + getGlobalStats
- apix-registry: SandboxResource GET /{uuid}/dashboard endpoint (was missing — fixes portal 500)
- apix-portal: RegistryClient path corrected to /dashboard
- apix-admin: new Quarkus module — auth filter, registry REST client, 3 resources, 6 Qute templates, admin.js
- infra: Dockerfile.admin, docker-compose admin-a/b services, Caddyfile admin.api-index.org block
- scripts: deploy-bluegreen.sh extended for admin-a/b
Co-Authored-By: Mira Rehfeld <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# promote-sandbox.sh — Promote a sandbox tier + fetch demo ecosystem UUID
|
||||
# Run on the server: bash promote-sandbox.sh
|
||||
set -euo pipefail
|
||||
|
||||
ENV_FILE="/opt/apix/.env"
|
||||
REGISTRY="https://api-index.org"
|
||||
|
||||
# ── Adjust these ───────────────────────────────────────────────────────────────
|
||||
SANDBOX_ID="25321050-4707-4e85-bd9f-877ab04e4a55"
|
||||
NEW_TIER="COMMUNITY"
|
||||
# ──────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
ADMIN_KEY=$(grep -oP '(?<=APIX_API_KEY=).+' "$ENV_FILE" | tr -d '[:space:]')
|
||||
|
||||
if [[ -z "$ADMIN_KEY" ]]; then
|
||||
echo "ERROR: APIX_API_KEY not found in $ENV_FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "==> Promoting sandbox $SANDBOX_ID to $NEW_TIER ..."
|
||||
curl -s -X PATCH "$REGISTRY/sandbox/admin/$SANDBOX_ID/tier" \
|
||||
-H "X-Admin-Key: $ADMIN_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tier\":\"$NEW_TIER\"}" | python3 -m json.tool
|
||||
|
||||
echo ""
|
||||
echo "==> Demo ecosystem sandbox UUID ..."
|
||||
docker exec "$(docker ps -qf name=demo-a)" \
|
||||
psql -U apix -d apix -t -A \
|
||||
-c "SELECT value FROM demo_config WHERE key='sandbox.id';"
|
||||
Reference in New Issue
Block a user