Skip to main content

Deploy Code

Deploy the cloud hosting project code to the cloud hosting environment

For Cloud Hosting Code Project, you can refer to the sample: nodejs_hello_world

Basic Usage

Enter the following command to start interactive deployment. During this process, the CLI will automatically prompt you for information such as the service and environment to be published.

tcb cloudrun deploy

Advanced Usage

Specify the port to deploy container-based cloud hosting services:

tcb cloudrun deploy -e <Environment ID> -s <Service Name> --port 3000 --force

Create a Function Agent (this will simultaneously deploy the dependent Function Cloud Hosting service)

tcb cloudrun deploy -e <Environment ID> --createAgent

Command Line Parameters

The supported command line parameters are as follows:

Options:
-e, --envId <envId> Environment Id
-s, --serviceName <serviceName> Service name
--port <port> Container-based cloud hosting service port (not applicable to function-based cloud hosting)
--source <source> Source directory path (absolute or relative, default: current directory)
--createAgent Create a Function Agent
--force Force deployment, skipping all confirmation prompts
-h, --help Display command help information