Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pi migration 2 #1902

Merged
merged 15 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions spiffworkflow-backend/keycloak/bin/start_keycloak
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function remove_traps() {
}

function error_handler() {
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
echo >&2 "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
exit "$2"
}
setup_traps
Expand All @@ -17,10 +17,10 @@ set -o errtrace -o errexit -o nounset -o pipefail

realm_name="${1:-}"
if [[ -z "$realm_name" ]]; then
realm_name="spiffworkflow"
realm_name="spiffworkflow-local"
fi

if ! docker network inspect spiffworkflow > /dev/null 2>&1; then
if ! docker network inspect spiffworkflow >/dev/null 2>&1; then
docker network create spiffworkflow
fi

Expand Down Expand Up @@ -53,7 +53,10 @@ docker run \
-D--spi-theme-cache-themes=false \
-D--spi-theme-cache-templates=false

script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
script_dir="$(
cd -- "$(dirname "$0")" >/dev/null 2>&1
pwd -P
)"
cp "${script_dir}/../realm_exports/${realm_name}-realm.json" /tmp/${realm_name}-realm.json
spiff_subdomain="for-local-dev.spiffworkflow.org"
perl -pi -e "s/replace-me-with-spiff-backend-host-and-path/${spiff_subdomain}/g" /tmp/${realm_name}-realm.json
Expand All @@ -80,11 +83,9 @@ if [ "${TURN_OFF_SSL:-}" == "true" ]; then
echo 'turned off SSL requirement'
fi


docker stop keycloak
docker start keycloak


# to export:
# /opt/keycloak/bin/kc.sh export --dir /tmp/hey --users realm_file
# change any js policies to role policies - just copy the config of one and change the type to role
Expand Down
Loading
Loading