mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 14:47:44 +01:00
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>
21 lines
694 B
Bash
Executable File
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" "$@"; }
|