DC_CMS/infra/scripts/bootstrap-authentik.sh

21 lines
610 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INFRA_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
cd "${INFRA_DIR}"
docker compose --env-file "${CMS_ENV_FILE:-.env}" -f docker-compose.yml exec -T authentik-worker sh -lc '
set -e
export PATH="${VENV_PATH}/bin:${PATH}"
for bp in \
default/flow-default-authentication-flow.yaml \
default/flow-default-invalidation-flow.yaml \
default/flow-default-provider-authorization-implicit-consent.yaml
do
/lifecycle/ak apply_blueprint "$bp"
done
/lifecycle/ak shell < /bootstrap/bootstrap-cms.py
'