Usage with docker #
you can also use keycloakmigraiton with docker. The migrations are then controlled trough environment variables and mounted volumes.
Usage #
docker run --env BASEURL=http://localhost:8080 klg71/keycloakmigration
Environment variables #
-
KEYCLOAK_CHANGELOG
migration changelog, should be mounteddefault: /migration/keycloak-changelog.yml
-
ADMIN_USER
user to execute migrationdefault: admin
-
ADMIN_PASSWORD
password of user to execute migrationdefault: admin
-
ADMIN_TOTP
totp of user to execute migrationdefault: unset
-
ADMIN_CLIENT
client to use for admin logindefault: admin-cli
-
LOGIN_REALM
realm to use for admin logindefault: master
-
BASEURL
Baseurl for the keycloak instancedefault: http://localhost:8080/auth
-
WAIT_FOR_KEYCLOAK
(flag) If keycloakmigration should wait for the keycloak instancedefault: unset
-
WAIT_FOR_KEYCLOAK_TIMEOUT
Wait time till keycloak migration fails if keycloak is not ready (only ifWAIT_FOR_KEYCLOAK
is set)default: 0(infinit)
-
FAIL_ON_UNDEFINED_VARIABLES
(flag) If keycloakmigration should fail if undefined template variables occurdefault: unset=false
-
DISABLE_WARN_ON_UNDEFINED_VARIABLES
(flag) If keycloakmigration should not warn if undefined template variables occurdefault: unset=false
-
CORRECT_HASHES
(flag) If keycloakmigration should migrate not matching hashes (see Hash Troubleshooting )default: unset=false
-
STAY_IDLE
(flag) Don’t kill container when migration is finished (useful for k8s deployment)default: unset=false