Skip to main content

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 inspect retrieves the complete configuration and runtime details of the active deployment for a service. Unlike compartment status, which gives a high-level overview across services, inspect surfaces the resolved build configuration, run configuration, readiness probe settings, container ID, and the full promotion stage — everything you need to debug a deployment or verify that your compartment.yml settings were applied correctly.

Usage

compartment inspect [options]

Options

FlagTypeDefaultDescription
--project <name>stringProject to query. Defaults to the name in compartment.yml when run from a project directory.
--env <name>stringproductionEnvironment to inspect.
--service <name>stringService to inspect. Required when a project contains more than one service.
--verbosebooleanfalseShow additional low-level details in the text output.
--output <format>text | jsontextOutput format. Use json to capture the full DeploymentInspectResponse payload.

Output fields

The inspect response includes the following fields for each deployment:
FieldDescription
buildResolved build configuration — strategy, build command, env keys, and APT packages.
runResolved run configuration — start command and restart policy.
readinessReadiness probe configuration — type, HTTP path, and timeout.
containerIdID of the running container, or null if not yet started.
healthRuntime health: pending, healthy, or unhealthy.
promotionStageCurrent stage in the deployment lifecycle.
routeUrlPublic URL serving live traffic, or null for non-routable services.
statusOverall runtime status: queued, running, succeeded, or failed.
routesActive routing rules applied to this deployment.
routeHostThe hostname under which this deployment is reachable.
upstreamHostInternal upstream host for the container.
drainDrain state if the container is being drained after a rollback or replace.

Examples

compartment inspect
If your project has multiple services and you omit --service, Compartment returns data for the first matching service. Pass --service explicitly when working with multi-service projects to avoid ambiguity.
Use --output json and pipe the result to a file when filing a support request or debugging a platform issue — the JSON payload contains every resolved field that Compartment used to start your container.