ops: paivana and caddy config refresh

This commit is contained in:
Hernâni Marques 2026-09-09 00:52:54 +02:00
parent d8dbc6242b
commit 56f814a6de
No known key found for this signature in database
74 changed files with 4517 additions and 79 deletions

23
scripts/notes/up.sh Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Bring up koopa-silverbullet / SilverBullet.
set -euo pipefail
DIR="${HOME}/koopa-silverbullet"
cd "${DIR}"
set -a
# shellcheck disable=SC1091
[[ -f .env ]] && source .env
set +a
PORT="${HOST_PORT:-9028}"
podman-compose up -d
echo "== wait for :${PORT} =="
ok=0
for i in $(seq 1 40); do
code=$(curl -sS -o /dev/null -w '%{http_code}' --max-time 5 "http://127.0.0.1:${PORT}/" || true)
echo "try $i: $code"
case "$code" in
2*|3*) ok=1; break ;;
esac
sleep 3
done
[[ "$ok" -eq 1 ]] || { echo "ERROR: no answer on ${PORT}"; podman-compose ps; exit 1; }
echo "local ok. public (after Caddy+DNS): https://silverbullet.hacktivism.ch/"