Protect Tabularium with persistent authenticator-code login
Verify and deploy Tabularium / verify-and-deploy (push) Successful in 5m28s

This commit is contained in:
2026-10-27 21:48:16 +08:00
parent 0a4057ac2a
commit 9fcfbdb694
31 changed files with 1549 additions and 60 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
set -eu
cd /opt/endorphin-tabularium-docs/current
command=${1:-qr}
compose() {
docker compose -p endorphin-tabularium-docs --env-file /etc/endorphin-tabularium-docs/production.env --env-file release.env -f compose.yml "$@"
}
case "$command" in
qr|token) compose exec docs node apps/docs/auth-cli.cjs "$command" ;;
qr-png|verify) compose exec -T docs node apps/docs/auth-cli.cjs "$command" ;;
rotate)
[ "${2:-}" = "--confirm" ] || { echo 'Use rotate --confirm to invalidate authenticators and sessions' >&2; exit 1; }
compose exec -T docs node apps/docs/auth-cli.cjs rotate --confirm ;;
*) echo 'Usage: auth qr | qr-png | token | verify | rotate --confirm' >&2; exit 1 ;;
esac