We'll use phabricator app as example. It should run after the mysql database was started.
Create the file phabricator-phd.service in /usr/lib/systemd/system/ folder.
[Unit] Description=Phabricator Daemons After=syslog.target After=network.target After=mariadb.service [Service] Type=forking User=apache Group=apache ExecStart=/var/www/html/phabricator/phabricator/bin/phd start ExecStop=/var/www/html/phabricator/phabricator/bin/phd stop Restart=always RestartSec=10 StartLimitInterval=0 StartLimitBurst=0 [Install] WantedBy=multi-user.target
Enable it at startup:
systemctl enable phabricator-phd.service
Run it:
systemctl start phabricator-phd