How to start the application on bootup

I am done with my application now, but I don’t know how can I make it run on bootup of the operating system. I noticed that the studio server should be running first as well as project itself should be open. I have tried using the gradlew --daemon start command, but for some reasons that studio server and the project had to be open in order to be able to work with the application.
Can someone please provide me with the guide to run the application without having to open the apps manually every time?

The easy way to do this, would be to just move the content of the build/tomcat folder to your server and then start bin/startup.bat - This is described here https://doc.cuba-platform.com/manual-6.3/fast_deployment.html, but then you will not get tomcat started as a service.

A more robust and correct way of running a web application, would be to follow this procedure - https://doc.cuba-platform.com/manual-6.3/tomcat_war_deployment.html

Another option is to run you application in Docker - as described here - https://www.road-to-cuba-and-beyond.com/put-a-island-into-a-box-how-to-dockerize-your-cuba-app/

Thank you so much. I went with the second method!

Just one more thing, second method shows how to do it on Windows OS. What if I want to use Linux or Mac?

One notice: the only reason why Studio can be required for running an application, is that it provides the HSQLDB server. If you use another database (which is highly recommended for production), your app should work fine without Studio.

This link describes a rather easy procedure for setting up Tomcat on Ubuntu -> http://www.vogella.com/tutorials/ApacheTomcat/article.html

There are different ways to install Tomcat on MacOs - One of these a described here->
https://wolfpaulus.com/journal/mac/tomcat8/