[Unit]
Description=WildFly (standalone 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/standalone.sh"
Environment="WILDFLY_SERVER_CONFIG=standalone.xml"
Environment="WILDFLY_CONSOLE_LOG=/opt/wildfly/standalone/log/systemd-console.log"
Environment="WILDFLY_BIND=0.0.0.0"
EnvironmentFile=-/etc/sysconfig/wildfly-standalone.conf

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

[Install]
WantedBy=multi-user.target
