9b70599d98
- Add concepts/graph-registry.md: SQL discovery limitations, Apache AGE two-stage plan, Mycorrhizal relationship, four open questions - RFC checklist: add capability string hierarchy formalization item (dot-notation is_instance_of semantics, prefix match requirement) - Fix Tippfehler: Pharmakagent -> Pharmaagent in 2026-05-18-de.md - Update deploy-registry.ps1 (ASCII-only, blue-green rolling deploy) Co-Authored-By: Mira Rehfeld <noreply@anthropic.com>
50 lines
2.0 KiB
PowerShell
50 lines
2.0 KiB
PowerShell
$ErrorActionPreference = "Stop"
|
|
$VPS = "deploy@204.168.156.179"
|
|
$MVN = "C:\Users\Anwender\IdeaProjects\Claude\bot-service-index\apix-mvp"
|
|
$QUARKUS_APP = "$MVN\apix-registry\target\quarkus-app"
|
|
$VPS_DEST = "/opt/apix/apix-registry/target/quarkus-app"
|
|
|
|
Set-Location $MVN
|
|
|
|
Write-Host "Building registry..."
|
|
mvn clean package -DskipTests -pl apix-registry -am -q
|
|
|
|
Write-Host "Syncing quarkus-app to VPS (rsync, only changed files)..."
|
|
$rsyncSrc = $QUARKUS_APP -replace '^([A-Za-z]):\\', '/cygdrive/$1/' -replace '\\', '/'
|
|
rsync -az --delete `
|
|
"${rsyncSrc}/" `
|
|
"${VPS}:${VPS_DEST}/"
|
|
|
|
Write-Host "Rebuilding Docker image on VPS..."
|
|
ssh $VPS 'cd /opt/apix && docker build -f infra/Dockerfile.registry -t apix-registry:latest . -q'
|
|
|
|
Write-Host "Rolling restart: registry-a..."
|
|
ssh $VPS 'cd /opt/apix && docker compose -f infra/docker-compose.yml --env-file .env up -d --no-deps registry-a'
|
|
|
|
Write-Host "Waiting for registry-a to become healthy..."
|
|
$elapsed = 0
|
|
do {
|
|
Start-Sleep -Seconds 5; $elapsed += 5
|
|
$status = ssh $VPS 'docker inspect infra-registry-a-1 --format "{{.State.Health.Status}}" 2>/dev/null || echo missing'
|
|
Write-Host " registry-a: $status (${elapsed}s)"
|
|
} while ($status -ne "healthy" -and $elapsed -lt 120)
|
|
|
|
if ($status -ne "healthy") {
|
|
Write-Host "ERROR: registry-a did not become healthy -- aborting, registry-b untouched"
|
|
ssh $VPS 'docker logs infra-registry-a-1 --tail 20 2>&1'
|
|
exit 1
|
|
}
|
|
|
|
Write-Host "Restarting registry-b..."
|
|
ssh $VPS 'cd /opt/apix && docker compose -f infra/docker-compose.yml --env-file .env up -d --no-deps registry-b'
|
|
|
|
Write-Host "Waiting for registry-b..."
|
|
$elapsed = 0
|
|
do {
|
|
Start-Sleep -Seconds 5; $elapsed += 5
|
|
$statusB = ssh $VPS 'docker inspect infra-registry-b-1 --format "{{.State.Health.Status}}" 2>/dev/null || echo missing'
|
|
Write-Host " registry-b: $statusB (${elapsed}s)"
|
|
} while ($statusB -ne "healthy" -and $elapsed -lt 120)
|
|
|
|
Write-Host "registry-a: $status registry-b: $statusB"
|
|
Write-Host "Done. https://api-index.org/" |