Catalyst-Managed Runtimes

Key Concepts

Overview

You can deploy an application as a Catalyst-managed runtime if its stack is one of the supported runtimes. You can develop this web service using any frameworks, libraries, plugins, or dependencies as needed. As the term suggests, it is only the runtime that is managed by Catalyst. You will still need to manage the dependencies your code includes. You can directly deploy the build files of your application, either through the CLI or from the console.

Catalyst currently manages the following runtimes:

  • Java: Java 8, Java 11, Java 17 in the Java SE and Java WAR formats
  • Node.js: Node 16, Node 18, Node 20
  • Python: Python 3.9

Although AppSail does not include many Catalyst-specific configurations or format restrictions, there are certain definitions that are bundled with your app that contain information about hosting and executing the app. These are discussed below.


The app-config.json File

When you initialize or add an AppSail service as a Catalyst-managed runtime from the CLI, Catalyst creates a configuration file app-config.json and includes your app configuration in it. This file is created in the directory you initialize the app in, otherwise called the source directory.

Note: The app-config.json file is not created when you do a standalone deploy without initializing or adding the app first. The configuration that this file carries is directly fetched as input from you in the CLI during the deployment. This file is also not created for apps initialized as a custom runtime.

A sample app-config.json created for a Java app is shown below:

copy
{
	"command": "java -jar demo-0.0.1-SNAPSHOT.jar",
	"buildPath": "/Users/emma-426/CatalystDirectories/DemoApp",
	"stack": "java8",
	"env_variables": {
		"clientid":xxxxxxx,
         "clientsecret":xxxxxx
         },
	"memory": 256,
	"platform": "javase"
	"scripts": {
		"preserve": "mvn install -DskipTests"
		"predeploy": "mvn install -DskipTests"
	}
}
  • command: The startup command for your app
  • buildPath: The directory that contains the build files of your app
  • stack: The Catalyst-managed runtime of your app
  • env_variables: The environment variables for your app
  • memory: The memory allocated for your app’s execution
  • platform: Defines if your app is of the javase or javawar format, applicable only to the Java stack
  • scripts: The scripts that can be executed before serving or deploying your app through preserve and predeploy

The values for the parameters stack, buildPath, and platform are fetched mandatorily while initializing or adding the app. You can configure the other values in this file before deploying your app to the cloud. You can also configure the environment variables, memory, and the startup command directly in the console after the deployment.


Source Directory and Build Path

  • By default, the source directory of your application is the directory that you execute the app initialize or add command from. You can also select another directory besides the current directory to be the source during the initialization.

  • You must add the source files of your app to the source directory.

  • The app-config.json file gets created in the source directory of your app.

  • The target directory is the directory that will contain the build files of your deployable web service.

  • You can specify the target directory of your app when you initialize or add the app, or add it for the parameter build-path in the app-config.json file.

  • When you do a standalone deploy, the current directory will be the build directory.

  • You need not bundle or zip all the build files together, as AppSail will automatically bundle them during the application serve or deployment from the build-path specified.

  • You can name the main file of your app’s build anything you prefer. However, when you build your app as a Java WAR file, you will need to name the main file root.war. This is to ensure further configurations are prevented from your end when the endpoint URL is generated for your application. If you name your WAR file anything else, you will need to add some necessary controllers in your code accordingly.


Common Build Files

For Catalyst-Managed runtimes, based on the runtime and framework, your compiled or deployable code could be of any format in any structure. Some common formats are mentioned below:

  • Java: The final build file of a Java WAR app is of the .war format. A WAR file is essentially a standard deployable format that can be readily run on any application server. It is a container for JAR files, JavaServer Pages, Java Servlets, Java classes, XML files, HTML, CSS etc of the application’s source.

    If your build files are of any other format besides a .war file, you can select the Java SE template. Some other formats include .jar or compiled class files, .class. If you use any Java frameworks or libraries, you must include those files in the build path.

  • Node.js: The main deployable file is typically a .js file. Based on the standards of the framework or the dependencies you add, there will be node modules and configuration files included in your app’s directory. You must ensure that you add all node modules and configuration files, along with the main file and native client files in the build path.

  • Python: The deployable main file is typically a .py file. Based on the standards of the framework, plugins, or dependencies you add, there will be Python and configuration files included in your app’s directory. You must ensure that you add all modules and configuration files, along with the main file and native client files in the build path.

You can refer to the Help Guide on building sample apps on building sample apps to learn more about using popular frameworks in each stack and deploying them as AppSail services.

Last Updated 2025-11-03 16:18:29 +0530 IST