5.3.1.1. Using Tomcat in Production

By default, the fast deployment procedure creates the app and app-core web applications running on port 8080 of the local Tomcat instance. It means that the web client is available at http://localhost:8080/app.

You can use this Tomcat instance in production just by copying the tomcat and app_home directories to the server. The user who runs Tomcat must have read-write permissions to both directories.

After that, set up the server host name in app_home/local.app.properties:

cuba.webHostName = myserver
cuba.webAppUrl = http://myserver:8080/app

Besides, set up the connection to your production database. You can do it in the context.xml file of your web application (tomcat/webapps/app-core/META-INF/context.xml), or copy this file to tomcat/conf/Catalina/localhost/app-core.xml as described in the previous section to separate development and production settings.

You can create the production database from a development database backup, or set up the automatic creation and further updating of the database. See Creating and Updating Database in Production.