Dear community,
I have created a custom UserStorageProvider that uses a separate database. I followed the qickstart from https://github.com/keycloak/keycloak-quickstarts/tree/latest/extension/user-storage-jpa by adding a custom persistence.xml and specifying the URL, user and password in quarkus.properties.
Now, I want to provide a Docker image of Keycloak with my extension pre-installed. Since the database URL and credentials are dynamic, they should not be included in the Docker image. Instead, I want to specify them while running the container.
For the Keycloak default data source. this can be done by specifying environment variables, as documented in Running Keycloak in a container. Unfortunately, I cannot find an equivalent solution for custom data source properties. There is a similar discussion on GitHub (Define Quarkus Properties from env vars · keycloak/keycloak · Discussion #22798 · GitHub) which does not provide a solution.
Additionally, since I am using an unsupported database (with db-kind=other), I have to specify a driver class. Since quarkus.datasource."datasource-name".jdbc.driver seems to be a build time option, I would like to do this during Docker build time. Is it possible to have some raw Quarkus properties in the Docker image and some others (the URL, user and password, which are not build time properties) to be set at runtime? Configuring Keycloak only speaks of quarkus.properties as a single file.
I would be glad if anyone could point me to a solution.
Best regards, Martin