diff --git a/templates/keycloak.conf.j2 b/templates/keycloak.conf.j2 index 11e592b..27d2eed 100644 --- a/templates/keycloak.conf.j2 +++ b/templates/keycloak.conf.j2 @@ -4,6 +4,14 @@ http-enabled={{ keycloak_http_enabled }} http-host={{ keycloak_listen }} http-port={{ keycloak_http_port }} +{% if not keycloak_optimize_build_at_startup %} +optimized=true +{% endif %} + +{% if keycloak_upgrade_db_at_startup %} +spi-connections-jpa-default-migration-strategy=update +{% endif %} + # Database # The database vendor. db={{ keycloak_db_vendor }} diff --git a/templates/keycloak.service.j2 b/templates/keycloak.service.j2 index 2060803..acd35b9 100644 --- a/templates/keycloak.service.j2 +++ b/templates/keycloak.service.j2 @@ -24,7 +24,7 @@ User={{ keycloak_user }} Group={{ keycloak_user }} SuccessExitStatus=0 143 UMask=0027 -ExecStart={{ keycloak_runtime_home }}/bin/kc.sh start{% if not keycloak_optimize_build_at_startup %} --optimized{% endif %}{% if keycloak_upgrade_db_at_startup %} --spi-connections-jpa-default-migration-strategy=update{% endif %} +ExecStart={{ keycloak_runtime_home }}/bin/kc.sh start [Install] WantedBy=multi-user.target