Starting as a Service
Last updated
Was this helpful?
When using CommandBox on a staging or production server, you may wish to start up servers as a service when the OS comes online. Here is a guide on each major OS type.
See screencast here: https://www.ortussolutions.com/blog/screencast-starting-commandbox-servers-as-a-windows-service
Coming soon...
Coming soon...
Create a .service file
nano /usr/lib/systemd/system/mySite.serviceas follows:
[Unit]
Description=mySite Service
[Service]
ExecStart=/usr/bin/box server start /var/www/mySiteAPI/server.json
Type=forking
[Install]
WantedBy=multi-user.targetStart the service
Give the service about a minute to load up, then check its status
Once you've verified the service is running as expected, enable the service to load at boot
Last updated
Was this helpful?
Was this helpful?
systemctl start mySite.servicesystemctl status mySite.servicesystemctl enable mySite.service