Deploy Your Application

We are going to be using the Catalyst Pipelines service to deploy and maintain your application in both the Catalyst console and your required GitHub repository.

Using the Pipelines service allows us to use a platform dependent package like Sharp. We require the Sharp package to convert and render the uploaded images as thumbnails in the client.

Catalyst runs on a Linux machine, in order to use the sharp package and host it on Catalyst, you could install Linux based package library for sharp package and deploy the application. Or, you could easily deploy the application using the Catalyst Pipelines service and all the required dependencies will be handled automatically. Using the Pipelines service allows you to seamlessly sync your application files between your GitHub repository and the Catalyst console.

To deploy the application using Pipelines:

  1. Click the Pipelines icon present in the Console’s sidebar to access the Pipelines service. catalyst_tutorials_photostore_stratus_pipelines_icons

  2. Click Create Pipelines catalyst_tutorials_photostore_stratus_pipelines_create_pipeline

  3. Name your pipeline as “PhotoStore-pipeline” and select GitHub as the integration source. catalyst_tutorials_photostore_stratus_name_github_sel

Info: We are demonstrating the Pipelines service using GitHub. You can also use the GitLab and BitBucket sources if your requirement demands it.
  1. Add your GitHub account from the drop-down. If you haven’t added it previously, you can click the +Add Account button and follow the login steps to add the GitHub account to the Catalyst Pipelines service. catalyst_tutorials_photostore_stratus_sel_github_acc

  2. Select your required GitHub Organization, and the repository you had earlier created to maintain the application files. catalyst_tutorials_photostore_stratus_sel_github_acc_repo_sel

  3. You will now be directed to the code-view of the catalyst-pipelines.yaml file. catalyst_tutorials_photostore_stratus_pipelines_yml_code_file_org
    You can also click the Builder tab to configure the .yaml file using the UI. catalyst_tutorials_photostore_stratus_sel_github_acc_yaml_buildeR_file

  4. Copy and paste the following snippet to define the sequence of stages and configure your Pipeline’s flow.

catalyst-pipelines.yaml
copy
version: 1
jobs:
  deploy:
    steps:
      - cd photo-store-app
      - npm install
      - npm run build
      - cd ..
      - cd server
      - npm install
      - cd ..
      - cd scripts
      - npm install
      - cd ..
      - node ./scripts/filesHelper.js -c ./server/ ./build/server/
      - node ./scripts/filesHelper.js -c ./photo-store-app/build/ ./build/photo-store-app/
      - npm install -g zcatalyst-cli@beta
      - catalyst deploy
stages:
  - name: build
    jobs:
      - deploy
View more
  1. Click Commit, to execute your Pipeline. catalyst_tutorials_photostore_stratus_pipelines_yml_cmpltd

  2. Provide a commit message and click Commit. catalyst_tutorials_photostore_stratus_pipelines_commit_msg

You will be directed to the overview section, where the status of the pipeline will be displayed along with other general details. catalyst_tutorials_photostore_stratus_pipelines_queued

With this step, the Pipeline has been configured and it will automatically begin its execution.

Add Global Variables

We will be adding two Global Variables for this Pipeline.

  • CATALYST_TOKEN: This variable needs to be added to point your local CLI to the Pipeline. Steps to generate the required token are listed below.
Note: This variable should be mandatorily added if you are using the CLI for deploying using the Pipeline service.
  • CI: You will need to set the value as False. This will ensure that the Pipeline will not fail even if there happens to be warnings in your code.

Generate Catalyst Token

We need to generate a token to allow Catalyst CLI to execute CLI commands from your local system to the Pipeline.

To generate a token:

  1. Execute the following command in your CLI
copy
$
catalyst token:generate

catalyst_tutorials_photostore_stratus_pipelines_token_gen

  1. Navigate to the URL displayed in your CLI, enter the verification code generated in the CLI, and click Verify. catalyst_tutorials_photostore_stratus_pipelines_token_entered

Once the CLI is verified, the token will be generated. catalyst_tutorials_photostore_stratus_pipelines_tokens_completed

Now, let’s begin adding the required global variables.

To add Global Variables:

  1. Click Global Variables. catalyst_tutorials_photostore_stratus_pipelines_gv_hihglit

  2. Enter CATALYST_TOKEN as key and the generated token as the value. Click The + icon to add the next token. catalyst_tutorials_photostore_stratus_pipelines_tokens_gv_1

  3. Enter CI as the key and False as its value. Click Save to add the variables. catalyst_tutorials_photostore_stratus_pipelines_tokens_gv_2

The required variables have been added.

You can check the status of the pipeline by clicking on the executed pipeline for more details. catalyst_tutorials_photostore_stratus_pipelines_running_status

Click the Advanced tab for more details on the process. catalyst_tutorials_photostore_stratus_pipelines_adv_processes

In a few moments, the pipeline will be successfully executed. catalyst_tutorials_photostore_stratus_pipelines_success_exec

The application will now be in sync in GitHub and the Catalyst console. catalyst_tutorials_photostore_stratus_pipelines_success_github

Now, you will be able to access the deployed version of the application using the App URL generated in the AppSail component present in the Catalyst Serverless service. catalyst_tutorials_photostore_stratus_catalyst_appsail_service_url_first_dep

You can execute this URL in the browser to access the deployed version of your application. catalyst_tutorials_photostore_stratus_pipelines_app_deployed_done

Last Updated 2025-10-09 17:47:14 +0530 IST