Deployment Method
CloudRun provides developers with multiple flexible deployment methods to meet the launch requirements of different types of projects.
Overview of Deployment Methods
Container Image Deployment 🐳 directly pulls custom or official images, suitable for projects with independent build processes or specific environment requirements.
Local Code Deployment 💻 uploads local code, with the platform automatically building the image, suitable for rapid iteration and small projects.
Git Repository Deployment 🔗 deploys from Git repositories, supporting binding to private repositories like GitHub and GitLab with automated deployment triggers, ideal for team collaboration and CI/CD. It also supports direct deployment via public repository URLs without authorization, suitable for open-source projects and quick trials.
CLI Deployment 🛠️ uses the command-line tool for one-click upload, build, and deployment, suitable for automation scripts and advanced users.
Different deployment methods can be flexibly chosen according to project requirements. The CloudRun platform provides detailed documentation and step-by-step instructions for each method, helping your application go live efficiently.
General Deployment Parameters Description
Regardless of the deployment method used, the following common parameters can be configured:
- Port: Specifies the service listening port. The platform automatically exposes this port as an external access entry point. For example:
8080or3000. - Environment Variables: Customizable environment variables (e.g.,
NODE_ENV=production,API_KEY=your_key, etc.) used to configure the application runtime environment. Supports multiple key-value pairs. - ENTRYPOINT: Customizes the container startup command (overriding the image's default ENTRYPOINT). For example:
["npm", "start"]. - CMD: Customizes the container startup parameters (overriding the image's default cmd). For example:
["--port", "3000"]. - Target Directory: Specifies the directory path where the Dockerfile is located (e.g.,
./app), defaulting to the project root directory. Suitable for multi-stage builds or subdirectory deployment scenarios. - Dockerfile Name: Custom Dockerfile filename (e.g.,
Dockerfile.prod), defaults toDockerfile. Suitable for multi-environment configuration scenarios. - Resource Limits: Configurable CPU and memory resource limits (e.g.,
1 CPUand2GB memory) to ensure stable service operation. - Network Configuration: Supports configuration of inter-service network interconnect and external access policies.
For detailed parameter descriptions and best practices, please refer to the details page of each deployment method or the platform's official documentation.