Skip to content

Allow skipping rm Keycloakify dev resource#689

Closed
chenhunghan wants to merge 1 commit intokeycloakify:mainfrom
chenhunghan:main
Closed

Allow skipping rm Keycloakify dev resource#689
chenhunghan wants to merge 1 commit intokeycloakify:mainfrom
chenhunghan:main

Conversation

@chenhunghan
Copy link
Copy Markdown

Similar to #647 but taking a shortcut to allow skipping removal of Keycloakify's dev resources. The reason for this is because we need to the raw dev resource to update the static files (js,css) into Keycloak, instead of packing into a .jar. and then upload.

Signed-off-by: Hung-Han (Henry) Chen <[email protected]>
@garronej
Copy link
Copy Markdown
Collaborator

garronej commented Oct 9, 2024

Hello @chenhunghan,

I think there is a missunderstanding.
The public/keycloak-dev-resouce directory is only there so you can test your login pages in storybook.
Nothing more. It should never be included in the build.

The reason for this is because we need to the raw dev resource to update the static files (js,css) into Keycloak, instead of packing into a .jar.

This is not the way to load extention into keycloak.
#673 (comment)
#660 (comment)

If you are not implementing a Multi-Page account theme and are deploying on Keycloak 26, copyting the files manually will work... today, but it the future I might need to add java extention so that you theme remain compatible with future version of Keycloak.
It's best to stick with the official way of loading extention in Keycloak. Just trying to prevent you from shooting yourself in the foot here.

@garronej garronej closed this Oct 9, 2024
@chenhunghan
Copy link
Copy Markdown
Author

chenhunghan commented Oct 9, 2024

Hello @chenhunghan,

I think there is a missunderstanding. The public/keycloak-dev-resouce directory is only there so you can test your login pages in storybook. Nothing more. It should never be included in the build.

The reason for this is because we need to the raw dev resource to update the static files (js,css) into Keycloak, instead of packing into a .jar.

This is not the way to load extention into keycloak. #673 (comment) #660 (comment)

Hi @garronej

To be clear we are not trying to load extension in production, only in development to /opt/keycloak/themes as suggested by Keycloak.

https://www.keycloak.org/docs/latest/server_development/#deploying-themes

Themes can be deployed to Keycloak by copying the theme directory to themes or it can be deployed as an archive. During development you can copy the theme to the themes directory, but in production you may want to consider using an archive...

Thanks for the pointer, will use unzip keycloak-theme-for-kc-22-and-above.jar -d extracted instead.

If you are not implementing a Multi-Page account theme and are deploying on Keycloak 26, copyting the files manually will work... today, but it the future I might need to add java extention so that you theme remain compatible with future version of Keycloak. It's best to stick with the official way of loading extention in Keycloak. Just trying to prevent you from shooting yourself in the foot here.

@garronej
Copy link
Copy Markdown
Collaborator

garronej commented Oct 9, 2024

Have you check this out: https://docs.keycloakify.dev/testing-your-theme/in-a-keycloak-docker-container

If it's for developement, using npx keycloakify start-keycloak works well and should cover all cases with the options it ussport

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