docker-compose environment for the entire v.st system https://v.st/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
env/keycloak/entrypoint-setup.sh

33 lines
608 B

#!/bin/bash -x
export PATH=/opt/keycloak/bin:$PATH
for file in /run/secrets/* ; do
. "$file"
done
# perform an authentication as admin so that all other scripts can
# use the cached credentials
kcadm.sh \
config credentials \
--server http://keycloak:8080/ \
--user admin \
--password "$KEYCLOAK_ADMIN_PASSWORD" \
--realm master \
|| exit 1
if ! kcadm.sh get realms/$REALM ; then
echo >&2 "***** Creating realm $REALM"
kcadm.sh \
create realms \
-s "realm=$REALM" \
-s enabled=true \
|| exit 1
fi
for file in /keycloak-setup/* ; do
echo >&2 "$file: running setup"
$file || exit 1
done