Files
loki/scripts/hetzner/lib.sh
T
Mao NakamotoandClaude Fable 5 625595db93 feat(infra): full Vercel/Supabase/Neon exit — SSOT manifest + deploy tooling for 16 self-hosted apps
apps.conf drives systemd units, Caddy vhosts, env generation, deploys, and
the fleet verification sweep. Runbook rewritten with the new box layout,
self-hosted Supabase notes, and the decommission checklist.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 19:42:46 +02:00

21 lines
694 B
Bash
Executable File

#!/usr/bin/env bash
# Shared helpers for the Hetzner self-host tooling. Source, don't execute.
set -euo pipefail
BOX="ubuntu@167.233.22.31"
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MANIFEST="$HERE/apps.conf"
# app_lookup <name> — sets NAME PORT DOMAINS REPO APP_DIR DB or exits 1
app_lookup() {
local line
line=$(grep -v '^#' "$MANIFEST" | grep "^$1|" || true)
[ -z "$line" ] && { echo "ERROR: '$1' not in $MANIFEST" >&2; return 1; }
IFS='|' read -r NAME PORT DOMAINS REPO APP_DIR DB <<<"$line"
}
app_names() { grep -v '^#' "$MANIFEST" | cut -d'|' -f1; }
# -n: don't consume stdin (box() is used inside while-read loops)
box() { ssh -n -o BatchMode=yes "$BOX" "$@"; }