Once Process Manager is up and listening, you can deploy your application to it. Remember,
slc build did not build in your binary dependencies, so you could compile your binary add-ons based on your server OS.
Using the slc deploy command
Go to your system and repository that has the deployable application and enter the
slc deploy command.
Its syntax is:Where:
- If you use the -s (or --service) option, the <service> argument is the service name, a string identifier for the application runtime instance.
- <server> is the server name or IP address.
- <port> is the TCP port on which Process Manager is listening.
- branch - a branch in the current Git repository. Default is "deploy"
- package - name of a local .tgz file or npm package to deploy. Default is
../<package_name>-<package_version>.tgz, where the package name and version come from the
package.jsonin the current working directory.
NOTE: Generally, you'll deploy a
.tgzfile created by
slc buildor the Arc Build & Deploy module, though it can be any .tgz file with the format created by npm pack.
For example, this deploys an application from the default "deploy" branch:
For more information, see slc deploy.
Deploying multiple applications to one PM
--service) option to deploy more than one application to a single instance of Process Manager.
When you deploy an application, simply supply the option and a unique string identifier (the service argument). Subsequently, you can use this identifier when using the
slc ctl command to manage and view status of the application.
Once deployed, the application is available over the network at port number
slc ctl command as shown in the example below.
Suppose also you have two applications: app1 and app2 from which you've created build archives (.tgz files) with
slc build. Let's assume the .tgz files are in the default location (the parent directory of the application root).
Now, assuming in each case that your working directory is the application root directory, you can deploy these two applications as follows:
Now, view status of all applications being run by this Process Manager:
You can see that the first application is available at:
And the second application is available at: