diff --git a/dev2/sites.d/bittorrented.com.json b/dev2/sites.d/bittorrented.com.json index 440d3be..e32de50 100644 --- a/dev2/sites.d/bittorrented.com.json +++ b/dev2/sites.d/bittorrented.com.json @@ -21,7 +21,7 @@ "service_id": null, "port": 3290, "cloud_ref": "ussbjnpovrynxyztjeeb", - "app_host": "do (DigitalOcean droplet 137.184.114.110, user ubuntu, systemd bittorrented.service); NOT on dev2", + "app_host": "dev2 (/home/anthony/www/bittorrented.com, hand-built kit-shaped deploy, since 2026-10-05; the DigitalOcean droplet is retired)", "notes": "Not a Railway site: only the Supabase stack lives on dev2 (supabase.bittorrented.com). DNS at DigitalOcean, so the cert is HTTP-01. The app, its workers and bitmagnet run on the droplet and were re-pointed by hand; never provision/deploy/dns/cutover this site with the kit.", "proxies": [ { @@ -35,5 +35,7 @@ "DOPPLER_CONFIG", "DOPPLER_ENVIRONMENT", "DOPPLER_PROJECT" - ] + ], + "image_repo": "ghcr.io/profullstack/bittorrented-web", + "image_note": "image built and pushed by profullstack/media-streamer .github/workflows/deploy-dev2.yml on GitHub Actions (public repo, free minutes); dev2 only pulls (never builds on dev2)" } diff --git a/dev2/sites.d/coinpayportal.com.json b/dev2/sites.d/coinpayportal.com.json index f2bfbc2..64eaada 100644 --- a/dev2/sites.d/coinpayportal.com.json +++ b/dev2/sites.d/coinpayportal.com.json @@ -34,5 +34,7 @@ "DOPPLER_ENVIRONMENT", "DOPPLER_PROJECT", "REPUTATION_SIGNING_SECRET" - ] + ], + "image_repo": "ghcr.io/profullstack/coinpayportal-web", + "image_note": "image built and pushed by profullstack/coinpayportal .github/workflows/deploy-dev2.yml on GitHub Actions (public repo, free minutes); dev2 only pulls (never builds on dev2)" } diff --git a/dev2/sites.d/crawlproof.com.json b/dev2/sites.d/crawlproof.com.json index f6f98bd..d6b26c7 100644 --- a/dev2/sites.d/crawlproof.com.json +++ b/dev2/sites.d/crawlproof.com.json @@ -11,5 +11,8 @@ "CRAWLPROOF_DEV_BOX_TOKEN", "GITHUB_APP_PRIVATE_KEY", "X402_PRIVATE_KEY" - ] + ], + "image_repo": "ghcr.io/profullstack/crawlproof-web", + "image_note": "image built and pushed by profullstack/crawlproof.com .github/workflows/deploy-dev2.yml on GitHub Actions (public repo, free minutes); dev2 only pulls (never builds on dev2)", + "image_deploy_note": "bespoke deploy-app.sh (repo ops/selfhost/server) with its own IMAGE_REPO mode; not rendered by the kit" } diff --git a/dev2/sites.d/installer.pairux.com.json b/dev2/sites.d/installer.pairux.com.json index 89ddc51..533e384 100644 --- a/dev2/sites.d/installer.pairux.com.json +++ b/dev2/sites.d/installer.pairux.com.json @@ -9,5 +9,7 @@ "vault_skip": [ "AUR_SSH_KEY", "GPG_PRIVATE_KEY" - ] + ], + "image_repo": "ghcr.io/profullstack/pairux-installer", + "image_note": "image built and pushed by profullstack/pairux.com .github/workflows/deploy-dev2-installer-pairux-com.yml on GitHub Actions (public repo, free minutes); dev2 only pulls (never builds on dev2)" } diff --git a/dev2/sites.d/pairux.com.json b/dev2/sites.d/pairux.com.json index 39e8490..d82df0e 100644 --- a/dev2/sites.d/pairux.com.json +++ b/dev2/sites.d/pairux.com.json @@ -29,5 +29,7 @@ "EXTELLA_USER_ID", "GPG_PRIVATE_KEY", "PAIRUX_PARTNERS" - ] + ], + "image_repo": "ghcr.io/profullstack/pairux-web", + "image_note": "image built and pushed by profullstack/pairux.com .github/workflows/deploy-dev2-pairux-com.yml on GitHub Actions (public repo, free minutes); dev2 only pulls (never builds on dev2)" } diff --git a/dev2/sites.d/threatcrush.com.json b/dev2/sites.d/threatcrush.com.json index 50746a0..19d8a92 100644 --- a/dev2/sites.d/threatcrush.com.json +++ b/dev2/sites.d/threatcrush.com.json @@ -27,8 +27,6 @@ "STOPFORUMSPAM_USERNAME", "THREATCRUSH_AGENT_KEY" ], - "remote_build": "c0mpute", - "remote_builders": [ - "12D3KooWK9tFibPXoRih5r66qatAQL59vj5SWD53PJTLAmaKBdpB" - ] + "image_repo": "ghcr.io/profullstack/threatcrush-web", + "image_note": "image built and pushed by profullstack/threatcrush .github/workflows/deploy-dev2.yml on GitHub Actions (public repo, free minutes); dev2 only pulls (never builds on dev2)" } diff --git a/dev2/templates/deploy-app.sh b/dev2/templates/deploy-app.sh index c637d56..be2f8ea 100755 --- a/dev2/templates/deploy-app.sh +++ b/dev2/templates/deploy-app.sh @@ -170,7 +170,7 @@ restore() { [ -z "${IMAGE_REPO:-}" ] || [ -z "$SNAP_APP_REF" ] || export APP_IMAGE="$SNAP_APP_REF" [ -z "$CURRENT" ] || git -C "$APP_DIR" checkout -q --detach "$CURRENT" compose up -d --no-build --remove-orphans - if health; then log "Restored the previous deploy"; return 0; fi + if health; then log "Restored the previous deploy"; ! declare -F handoff_import >/dev/null || handoff_import || true; return 0; fi log "ROLLBACK ALSO UNHEALTHY - site is down" return 1 } @@ -415,6 +415,26 @@ if [ -n "${STANDBY_PORT:-}" ] && [ "$RECREATE" = 0 ]; then fi fi +# Operator vault handoff (coinpayportal.com): take the old process's in-memory unlock +# before it stops and give it to the new one once healthy +# (scripts/operator-vault-handoff.sh in the app repo; the key stays in this shell +# variable, never a file or argv). No such script, or a locked vault: no-op. +HANDOFF_SH="$APP_DIR/scripts/operator-vault-handoff.sh" +OPERATOR_HANDOFF="" +OLD_CID=$(compose ps -q app 2>/dev/null | head -n1 || true) +if [ -x "$HANDOFF_SH" ] && [ -n "$OLD_CID" ]; then + OPERATOR_HANDOFF=$("$HANDOFF_SH" export "$OLD_CID" 2>/dev/null || true) + if [ -n "$OPERATOR_HANDOFF" ]; then log "Operator unlock taken from the old container for handoff" + else log "No operator unlock to hand off (locked, or old image)"; fi +fi +handoff_import() { + [ -n "$OPERATOR_HANDOFF" ] || return 0 + local cid; cid=$(compose ps -q app 2>/dev/null | head -n1 || true) + if printf '%s' "$OPERATOR_HANDOFF" | "$HANDOFF_SH" import "$cid"; then log "Operator unlock handed to the new container" + else log "WARNING: operator unlock handoff failed: unlock at /admin/operator-vault"; fi + OPERATOR_HANDOFF="" +} + # From here on the running stack is touched: any failure rolls back to the images # it was running. snapshot @@ -445,6 +465,7 @@ fi if health; then trap - ERR log "Healthy on 127.0.0.1:$APP_PORT$HEALTH_PATH" + handoff_import || true { echo "DEPLOYED_SHA=$SHA" echo "PREVIOUS_SHA=$CURRENT"