[Unit]
Description=WildFly (domain mode)
After=syslog.target network.target
Before=httpd.service

[Service]
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1
Environment="JAVA_HOME=/usr/lib/jvm/jre"

Environment="WILDFLY_SH=/opt/wildfly/bin/domain.sh"
Environment="WILDFLY_SERVER_CONFIG=domain.xml"
Environment="WILDFLY_CONSOLE_LOG=/opt/wildfly/domain/log/systemd-console.log"
Environment="WILDFLY_HOST_CONFIG="
Environment="WILDFLY_BIND=0.0.0.0"
EnvironmentFile=-/etc/sysconfig/wildfly-domain.conf

User=wildfly
Group=wildfly
LimitNOFILE=102642
ExecStart=/bin/sh -c "/opt/wildfly/bin/systemd/launch.sh"
TimeoutSec=600

[Install]
WantedBy=multi-user.target
