Deploy AppSail as a Custom Runtime from the CLI

Initialize or Add an AppSail Service

You can initialize an AppSail service for a custom runtime app directly in your app’s directory, or from a new directory using the Catalyst CLI. You can also add an AppSail service to an existing Catalyst project directory, where other resources have been initialized. You can deploy the AppSail service after you initialize or add it.

To initialize an AppSail service in a new directory, create a folder for your project in your local machine and navigate to it from your terminal. Initialize a project by executing the following command from that directory:

copy
$
catalyst init

You can add an AppSail service in an existing Catalyst project directory by executing this CLI command:

copy
$
catalyst appsail:add

Catalyst supports two protocols for custom runtime apps that you can use to associate your app’s image with AppSail. Each protocol has a distinct schema for identification and functioning.

  • Docker Image Protocol: Use this to associate a pre-built image of your app present in the local docker registry. The image must be built and tagged to point to the local registry. Example: docker://localhost/expres-hw:latest

  • Docker Archive Protocol: Use this to point to an archive file (.tar or .tar.gz) of a pre-built image of your app in your system’s directory. Example: docker-archive://test.tar

Note: The .tar file can be typically generated with the docker save command.

You need not provide any other details except the name for the AppSail for container images. The source or build path of the app, stack, and startup command are not required to be configured for OCI images, as they are already defined in the images. The steps to initialize or add the AppSail service will be the same as described below:

  1. The CLI will prompt you to select the runtime type as Catalyst-Managed Runtime or Docker Image when AppSail is initialized. Select the second option.

catalyst_cli_appsail_init_1

  1. Select the protocol as Docker Image or Docker Archive.

catalyst_cli_appsail_init_1

  1. Docker Image Protocol:

If you select Docker Image, the CLI will list all the available images with tags in the local docker registry. Select the image you need.

catalyst_cli_appsail_init_1

Docker Archive Protocol:

If you select Docker Archive, the CLI will prompt you to enter the absolute path to the TAR file image of your app in your local system.

catalyst_cli_appsail_init_1

Note: When the AppSail configuration is stored in the catalyst.json file, the path will be stored relative to that file's location.
  1. Provide a name for the AppSail service. You can name it anything you prefer.

catalyst_cli_appsail_init_1

AppSail is now initialized in your local directory, and the app’s image is now associated with the AppSail service. The configurations will be updated in catalyst.json file accordingly.

catalyst_cli_appsail_init_1

Note: The app-config.json file will not be created when you initialize AppSail with a container image. All the app specifications will be stored in the catalyst.json file. You can add certain custom configurations of your app in this file. Refer here for details.

You can now code your business logic in your app, then serve the AppSail service through a localhost to debug and test it, or deploy it to the remote console directly.

Deploy an AppSail Service

Catalyst enables you to deploy AppSail services in two different ways:

  • Regular Deploy: The regular deploy execution applies when you have already initialized an AppSail resource either during the project initialization or by adding it in an existing project directory.

  • Standalone Deploy: You can do a standalone deploy of an app directly without initializing it as an AppSail service in prior.

The OCI image of your app that is associated with Appsail is deployed, along with the configuration file of your project.

Note: Catalyst only supports the deployment of OCI-compliant images built for the Linux AMD64 (x86-64) platform.

Regular Deploy

If the AppSail app is already initialized in the project directory, the CLI will automatically deploy the app with the rest of the project resources when you execute the catalyst deploy command. The CLI will display the endpoint URL of the app after it is deployed, that you can open it with.

Deploy AppSail

If you have multiple AppSail apps in your project directory, you can access all of their URL endpoints from the CLI.

You can also execute the following command to deploy the AppSail service alone from your app’s source directory.

copy
$
catalyst deploy appsail

The deployment process is the same.

Deploy AppSail


Standalone Deploy

You must execute the standalone deploy command from a Catalyst project directory’s root. That is, catalyst.json and other project dependency files must be present in the directory.

Note: If you execute the standalone deploy command without any of the [options specific to deploying container images](#standalone-deploy-appsail-options), the CLI will prompt you for inputs related to Catalyst-managed runtime apps only by default.

You can use the standalone deploy command with these options to deploy apps as container images: –name <name>, –source <image>, –command <command>, –port <port>. The first two are mandatory, while the last two are optional and can be used to override any startup commands or ports already configured in the container image definition. The options are explained in detail below.


You can do the standalone deploy of an AppSail app in the following way:

  1. Navigate to the directory the app’s deployable files are present in, and executing the following command:
copy
$
catalyst deploy appsail
  1. Enter a name for your app. You can name the main file of your app’s build anything you prefer.

Deploy AppSail

Note: However, when you build your app as a Java WAR file, you will need to name the main file root.war or add specific controllers according to your code.
  1. Select the build path for your app from the list and press Enter.

Deploy AppSail

  1. Select a stack for your app and press Enter.

Deploy AppSail

If you select Java, the CLI will further prompt you to pick either Java SE or the Java WAR as your app’s deployable format.

Deploy Functions

If you select any other stack, this will be skipped.

  1. You must additionally specify the startup command for your app based on the stack, framework, and web server used. This information will be directly deployed and will be available in the Configurations section of your console after the app deployment.

Deploy Functions

Your app is now directly deployed to the associated remote project without requiring you to initialize it as an AppSail resource. You can now access it with its endpoint URL displayed in the CLI.

Deploy Functions


Standalone Deploy AppSail Options

The catalyst deploy appsail standalone command supports the following options. Some of these are applicable to both Catalyst-managed runtime and container images apps, while some are specific to only one of them.

–name <name>

Use this to specify the name of your app. This is applicable to both Catalyst-managed runtime and container image apps. Example:

copy
$
--name DemoApp

–command <command>

Use this to specify the startup command for your app. This is applicable to both Catalyst-managed runtime and container image apps. This will override any values already configured in the container image definition. Example:

copy
$
--command npm start

–source <image>

Use this to specify the source of the docker image to be deployed. This is applicable only to container image apps. You must start with ‘docker://’ for Docker image protocol and ‘docker-archive://’ for Docker archive protocol. Refer here for details. Example:

copy
$
--source docker://example-voting-app-worker:latest

–port <port>

Use this to specify the port for the AppSail. This is applicable only to container image apps. This will override any values already configured in the container image definition. Example:

copy
$
--port 8000

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