Documentation Index
Fetch the complete documentation index at: https://docs.compartment.dev/llms.txt
Use this file to discover all available pages before exploring further.
compartment deploy reads the compartment.yml descriptor in your working directory, builds the specified services, and deploys them to a Compartment environment. By default it targets all services defined in the file and deploys to the production environment. Use --service to deploy a single service or --env to target a different environment. Pass --verbose to stream build and promotion progress to your terminal as the deployment runs.
Usage
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--env <name> | string | production | Name of the target environment. |
--project <name> | string | — | Override the project name from compartment.yml. |
--service <name> | string | — | Deploy only the named service instead of all services. |
--verbose | boolean | false | Stream live deployment progress to the terminal. Ignored when --output json is set. |
--output <format> | text | json | text | Output format for the final result. |
compartment deploy requires a valid compartment.yml in the current directory. Run compartment init first if you have not set one up.What deploy does
- Reads
compartment.ymlfrom the working directory. - Sends the descriptor to the Compartment control plane along with the target environment name.
- The platform builds a container image for each service.
- After a successful build, the candidate container starts and Compartment runs any configured readiness checks.
- Once the candidate is healthy, traffic switches over and the previous container drains. The deployment is marked
active.
Output
After a successful deploy, the text output looks similar to this:--output json to receive the full DeploymentStatusResponse payload.