26 lines
1.2 KiB
Django/Jinja
26 lines
1.2 KiB
Django/Jinja
[Unit]
|
|
Description=Keycloak Application Server, running with Quarkus
|
|
After=syslog.target network.target
|
|
{% if keycloak_before_nginx %}
|
|
Before=nginx.service
|
|
{% endif %}
|
|
{% if keycloak_before_apache_httpd %}
|
|
{% if ansible_distribution_file_variety == "RedHat" %}
|
|
Before=httpd.service
|
|
{% endif %}
|
|
{% if ansible_distribution_file_variety == "Debian" %}
|
|
Before=apache2.service
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
[Service]
|
|
Environment=JAVA={{ keycloak_openjdk_bin }}
|
|
Environment=JAVA_HOME=/usr/lib/jvm/java-{{ keycloak_openjdk_runtime_version}}-openjdk-amd64
|
|
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_disabled_features | length %} --features-disabled={% for dis in keycloak_disabled_features %}{{ dis }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}{% if keycloak_preview_features | length %} --features={% for feat in keycloak_preview_features %}{{ feat }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}{% if keycloak_upgrade_db_at_startup %} --spi-connections-jpa-default-migration-strategy=update{% endif %}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |