Skip to content

Conversation

@dave-meyer
Copy link
Contributor

I propose to mount the Keycloak /opt/keycloak/providers directory in the Docker container to a local providers folder inside the project, using a Docker volume. This makes it possible to test themes for production by creating a .jar file (i.e. .zip file renamed to .jar) of the contents of the src folder and moving it into the new providers folder.

Q: But why add it by default? Can't the developers add the volume when they need it?
A: Docker volumes cannot be added to a container after the container has been created. So if the developers realize they need the providers folder, they need to re-create the container, and possibly lose their configuration.

I also added a .gitkeep file to the providers folder as well, so that it is immediately apparent where to put the custom providers when cloning the repo.

LMK if you want me to add documentation for this folder to README.md as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea to add this mount, definitely doesn't hurt!

I'm not a fan of .gitkeep personally, I'm more the empty .gitignore type ;-). However, I propose the following changes:

  • Instead of this .gitkeep, add a readme.md to this folder outlining the steps on how to test a .jar file using this approach (i.e.,, a step-by-step instruction or a shell two-liner to (a) `zip -r ../src -o ./theme.jar' and (b) the required steps how to enable it in the realm
  • Add a short reference to this new readme.md, best put here

Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants