Add an AppSail Service

Introduction

AppSail is a serverless PaaS offering of Catalyst that you can use to deploy apps of any scale and manage platform instances. You can build and deploy AppSail services in any frameworks of the three supported programming environments: Java, Node.js, Python.

You can associate an existing Catalyst project directory with an app using this command. If you have not initialized a project for your app, you can initialize an AppSail service with the project. Additionally, you can directly deploy an AppSail app without initialization through the standalone command.

Note: Refer to this help section to learn about the source directory and build directory of your AppSail app, as well as the app-config.json file that is created when an AppSail service is initialized.

Add a Service

You can add an AppSail service directly in your app’s directory, or from a new directory in the following manner:

  1. Execute the command given below from the CLI:
copy
$
catalyst appsail:add
  1. Select if this will be your source directory of your app by entering “Y”. If you enter “N”, the CLI will prompt you to type in a directory path for your app’s source. Press Enter after the entries.

cli-appsail-add-1

  1. Select the build path for your app from the list and press Enter.

cli-appsail-add-2

  1. Enter a name for your app. You can name the main file of your app’s build anything you prefer.

cli-appsail-add-3

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 a stack and runtime for your app and press Enter.

cli-appsail-add-4

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. You can learn more about this here.

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


AppSail is now linked with your app, and the app is now associated with the Catalyst project. The configurations will be updated in catalyst.json file accordingly.

cli-appsail-add-5

AppSail will only create a single configuration file, app-config.json, in your app’s source directory. You can learn more about this from the Project Directory Structure help page.

catalyst_cli_appsail_init_8


Last Updated 2024-01-04 12:37:42 +0530 +0530