Skip to end of metadata
Go to start of metadata

API Builder 3.x is deprecated


Support for API Builder 3.x ceased on 30 April 2020. Use the v3 to v4 upgrade guide to migrate all your applications to API Builder 4.x.

Contact if you require migration assistance.

This document will walk you through the process of how to publish API Builder apps to a newly deployed cluster using Appcelerator CLI commands.


The use of small containers should be avoided when publishing API Builder applications using the Appcelerator CLI commands. The minimum recommended container size for Arrow Apps is "Medium". Though you may be able to deploy to a "Dev" or "Small" container, for better memory usage and performance it is highly recommended that you use medium or bigger size containers.


You will need Appcelerator CLI (appc cli) version 7.0.0+. To install Appcelerator CLI 7.0.0, execute this command:

Publish source code

 The legacy method to publish the API Builder app is as follows:

  1. Create a new API Builder app:

  2. Update appc.json environment to add extra_hosts if you haven't set up a DNS yet. If your cluster uses as a domain name, then you need to add NODE_ENV as well:

  3. Execute appc install (required prior to the release of version 6.2.0).
  4. Then publish the app normally by executing this command: appc publish

Publish by providing Dockerfile

Starting from AMPLIFY Runtime Services (formerly known as Arrow Cloud) 1.6.0, you can publish to AMPLIFY Runtime Services by pushing a Docker image directly. If your cluster has no Internet access, this is the recommended method to publish.

  1. Create a new API Builder app:

  2. Prepare a Dockerfile by creating a Dockerfile under your project directory and use the start_app script. Use of start_app is required if you want to able to retrieve access and console logs of your app using the appc cloud logcat and appc cloud accesslog commands. The following is a sample Dockerfile for an API Builder app:

  3. The start_app script should look something like this and be placed under the project directory with the Dockerfile:

     Expand source
  4. Execute appc publish. You will need to provide the app version using the --app-version flag. You should always provide the app name since Appcelerator CLI will not scan package.json as it would normally with source code publishing that does obtain the app name. Using appc publish will build the Docker image by using the provided Dockerfile and push the image to AMPLIFY Runtime Services directly:

  5. If you need to scale up the number of servers, execute these commands:

Publish by using existing Docker image

Alternatively, after preparing your Dockerfile and start_app script, you can build the Docker image yourself and publish the image to AMPLIFY Runtime Services: 

  1. Build the Docker image:

  2. Next, publish the image directly. Ensure that you provide the app version and name and image name by using the --app-versionappname, and --image flags:

  3. If you need to scale up the number of servers, execute these commands:


    If you haven't set up your DNS yet, your app publish may fail with the following error:

    In this case, you will need to execute the following command to configure the custom host info in the app container. Please note if you try to update /etc/hosts file in the Dockerfile with the custom hostname and IP. It will not work because the Docker swarm mode will override that information at the time of the container launch.


    Note about Docker image publish with Alpine: You will need to execute apk add --no-cache curl in the Docker file when publishing the Docker image.


CLI commands

appc loginLogin
appc config set defaultEnvironment preproductionSelection of an environment (optional, if the default needs to be switched).
appc newCreate an app.
appc publishPublish the app.
appc cloud listQuery the list of applications that are deployed to my current environment and dashboard.
appc cloud list <appname>Query the config for a specific application that is deployed to the currently referenced environment and dashboard.
appc cloud config --maxsize 4 <appname>Configuration for a given application: change the maximum number of containers.
appc cloud config —minsize 2 <appname>Configuration for a given application: change the minimum number of containers.
appc cloud server <appname> —set <value>Change the size of the given application. Accepted values include Dev, Small, Medium, Large, and XLarge.
appc cloud logcatView logs of the application.
appc cloud loglist —build_logsView logs of the application.
appc cloud accesslogList application's access log.
appc cloud addAdd a new route or service.
appc cloud cnameSet a CNAME for an application.
appc cloud configConfigure the application.
appc cloud crtManage SSL certificates for the application.
 appc cloud download

Download source files for the specified application and version.


If you publish using a Docker image, this command won't work.

appc logoutLog out
appc removeRemoves installed Appcelerator CLI.
appc runRun an application locally for dev. and/or testing.
appc unpublishUnpublish an application.
appc cloud whoamiShow current login user.