We’re running the offical Docker image of Keycloak 11.0.2 as a Docker Swarm service in multiple stacks (development, testing, etc.). Now we need two additional clients for a new application. I’d like to automate this task to avoid that someone forgets to create the clients for the different stacks.
My first idea was to just use the admin CLI in a shell script with something like this:
kcadm.sh create clients -r demorealm -s clientId=myapp -s enabled=true
According to the documentation there is the possibility to use custom scripts by adding them to
/opt/jboss/startup-scripts but am I right that this is only for configuring the WildFly instance and not the Keycloak objects?
How could I call a shell script after the Docker image has been started so that Keycloak is up and running?