---
title: "Run the deploy job's Compose configuration check for a deployment, without deploying: the deployment's commit, the project's current override, exclusions and security policy, and the environment's variables. Returns the error the deployment would fail with, its class, and the exact `docker compose config` command with sanitized output. Read-only."
method: POST
path: "/projects/{project_id}/deployments/{deployment_id}/compose-check"
tags: ["Compose"]
---

# Run the deploy job's Compose configuration check for a deployment, without deploying: the deployment's commit, the project's current override, exclusions and security policy, and the environment's variables. Returns the error the deployment would fail with, its class, and the exact \`docker compose config\` command with sanitized output. Read-only.

`POST /projects/{project_id}/deployments/{deployment_id}/compose-check`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/deployments/{deployment_id}/compose-check`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required
- `deployment_id` integer, required

## Response `200`

Check result (passed or the failure)

- ComposeCheckReport: Result of running the deploy-time resolution and policy validation.
  - `command` ComposeCheckCommand: The `docker compose` invocation a check ran, sanitized for display.
    - `argv` string[], required: Program and arguments. Contains paths and option names only; no variable values are passed on the command line.
    - `exit_code` integer, nullable: Process exit code; `None` when it was killed or did not start.
    - `stderr` string, nullable: The tail of stderr with variable values, quoted text, assignments, URLs and absolute paths removed. Line numbers and error wording are kept.
  - `error` string, nullable: The same message the deployment would fail with. Variable values are redacted.
  - `error_class` 'interpolation' | 'policy_violation' | 'invalid_path' | 'invalid_yaml' | 'invalid_override' | 'unsupported_compose_version' | 'config_resolution' | 'compose_unavailable' | 'internal': Stable, user-facing class of a Compose check failure. The deploy job, the preview and the check action all report the same class for the same input.
  - `notes` string[], required: Caveats about what this check could not cover.
  - `passed` boolean, required: Whether the configuration would pass the deploy-time checks.
  - `referenced_variables` string[], required: Variables the file references, in sorted order. Names only.
  - `resolution_ran` boolean, required: Whether `docker compose config` actually ran for this check.
  - `resolution_reasons` string[], required: Why `docker compose config` had to run (project override, include, extends, YAML tags). Empty when the file was validated directly.
  - `unset_variables` string[], required: Variables referenced without a default that are not set; Compose substitutes an empty string for each.

## Other responses

- `400`: Not a Docker Compose project
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Project, deployment or environment not found
- `500`: Internal server error
- `502`: The Compose file could not be read from the Git provider

## Changes

> 81 revisions in range; 1 not diffed.

- **2026-10-15** `1e4cb0e3bc90`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/deployments/:deployment_id/compose-check/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) · [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) · [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/ab6d5d19e930?raw)
