keycloakify / keycloakify

🔏 Keycloak theming for the modern web
https://www.keycloakify.dev
MIT License
1.47k stars 146 forks source link

Can i set custom provider jar files in the hot reload? #584

Open deincodeverbesserer93 opened 2 months ago

deincodeverbesserer93 commented 2 months ago

Hello,

i want to use the hot reload with npx keycloakify start-keycloak. Is there a possiblity to mount a custom jar file to keycloak and the docker run or to set volumes. Also i want to mount a pem file in the /opt/keycloak/conf/truststores. Or can i use the hot reload with a customizied docker-compose.yml in a other project and mount for example dist_keycloak of keycloakify?

version: '3'
services:
  keycloak:
    image: quay.io/keycloak/keycloak:25.0.1
    ports:
      - 8890:8080
      - 5005:5005 #Debug-Port
    environment:
      - KEYCLOAK_ADMIN=admin
      - KEYCLOAK_ADMIN_PASSWORD=admin
      - KEYCLOAK_LOGLEVEL=ALL
      - KEYCLOAK_BIND=0.0.0.0
      - JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n #For Debug
    volumes:
      - "./data:/opt/keycloak/data"
      - "./truststore.pem:/opt/keycloak/conf/truststores/truststore.pem"
      - "/dist_keycloak/target/lindner-theme.v2-keycloak-theme-1.0.0.jar:/opt/keycloak/providers/lindner-theme.v2-
    command:
      - "--spi-theme-static-max-age=-1"
      - "--spi-theme-cache-themes=false"
      - "--spi-theme-cache-templates=false"
      - "start-dev"
garronej commented 1 month ago

Hello @deincodeverbesserer93,

At the moment it is not possible to load an extra JAR or configure the Docker arguments in any way beyond selecting the port or defining environement variables.

However you can add extra files to the Jar that keycloakify builds, maybe it can help:

https://docs.keycloakify.dev/build-options/postbuild