*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Verified Commit 7fe5c181 authored by Tsepelakis, Sotirios's avatar Tsepelakis, Sotirios :dart:
Browse files

:arrows_clockwise: Scripts: fix import/export

* Remove --users flag from export, it is only valid when exporting to a directory
* Specify management-port flag. Default one points to 9000 which clashes with the already running Keycloak instance
parent 92675558
Branches
No related tags found
1 merge request!23Bump Keycloak version & minor script fixes
......@@ -12,10 +12,10 @@ OUTPUT_FILE="${1:-crdm-realms.json}"
# check if container is running
if [ -z `docker compose ps -q keycloak` ] || [ -z `docker ps -q --no-trunc | grep $(docker compose ps -q keycloak)` ]; then
echo >&2 "ERROR: Container is not running."
echo >&2 "[ERROR]: Keycloak container is not running."
exit 1
fi
docker compose exec keycloak /opt/keycloak/bin/kc.sh export \
--file /opt/keycloak/data/export/"${OUTPUT_FILE}" \
--users realm_file
--http-management-port 9001
......@@ -12,10 +12,11 @@ INPUT_FILE="${1:-crdm-realms.json}"
# check if container is running
if [ -z `docker compose ps -q keycloak` ] || [ -z `docker ps -q --no-trunc | grep $(docker compose ps -q keycloak)` ]; then
echo >&2 "ERROR: Container is not running."
echo >&2 "[ERROR] Keycloak container is not running."
exit 1
fi
docker compose exec keycloak /opt/keycloak/bin/kc.sh import \
--file /opt/keycloak/data/export/"${OUTPUT_FILE}" \
--override false
--file /opt/keycloak/data/export/"${INPUT_FILE}" \
--override false \
--http-management-port 9001
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment