Deploy Caddyfile to valhalla / deploy (push) Failing after 1m37s
Adds idempotent scripts/run-books-auth.sh (ak shell) that creates forward_single proxy providers for chaptarr/books/storyteller on the embedded outpost and the homelab-audiobooks OIDC provider. Records the ABS client credentials in media stack.env and marks host prep done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 lines
605 B
Bash
Executable File
10 lines
605 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Creates the books-stack Authentik providers/apps (idempotent). Run on valhalla.
|
|
# Prints the audiobookshelf OIDC client id/secret path on success.
|
|
set -euo pipefail
|
|
here="$(cd "$(dirname "$0")" && pwd)"
|
|
docker cp "$here/setup-books-auth.py" authentik_server:/tmp/setup-books-auth.py
|
|
docker exec authentik_server ak shell -c "exec(open('/tmp/setup-books-auth.py').read())" 2>&1 | grep -E '^(PROXY|OIDC)|Error|Traceback'
|
|
docker cp authentik_server:/tmp/books-abs-oidc.env "${1:-./books-abs-oidc.env}"
|
|
docker exec authentik_server rm -f /tmp/books-abs-oidc.env /tmp/setup-books-auth.py
|