---
title: "Parse a compose file's services for a public repository (supports GitHub and GitLab). Unlike env-example detection, the caller already knows the path (from the `compose_files` list `/preset` already returned), so this fetches that one file directly rather than scanning the tree first."
method: GET
path: "/git/public/{provider}/{owner}/{repo}/compose-file"
tags: ["Public Repositories"]
---

# Parse a compose file's services for a public repository (supports GitHub and GitLab). Unlike env-example detection, the caller already knows the path (from the \`compose_files\` list \`/preset\` already returned), so this fetches that one file directly rather than scanning the tree first.

`GET /git/public/{provider}/{owner}/{repo}/compose-file`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/git/public/{provider}/{owner}/{repo}/compose-file`
- Auth: none declared

## Path parameters

- `provider` string, required
- `owner` string, required
- `repo` string, required

## Query parameters

- `base_url` string, nullable
- `branch` string, nullable
- `path` string, required

## Response `200`

Compose services parsed successfully

- PublicComposeServicesResponse: Response for compose-file service preview
  - `branch` string, required: Branch the file was read from
  - `path` string, required
  - `services` PublicComposeServicePreview[], required
    - `depends_on` string[], required
    - `detected_service_type` 'postgres' | 'mariadb' | 'mongodb' | 'redis' | 's3', nullable: The specific well-known service family a compose service's image matches, when it matches one Temps can deploy as a managed `external_services` row instead. Drives the "deploy this as a Temps-managed service" recommendation in `GitSettings.tsx` and the deploy-log message — kept separate from `ComposeServiceSnapshot::looks_like_database` (which stays a plain bool) because that field only gates the unrelated "may need elevated Linux capabilities" warning, and S3/MinIO images need this classification without tripping that warning.
    - `environment_variables` string[], required: Environment variable names declared by this service. Values are intentionally omitted.
    - `health_check_path` string, nullable: HTTP path declared by a loopback Compose healthcheck, if unambiguous.
    - `image` string, nullable
    - `looks_like_database` boolean, required: True when the image looks like a well-known database engine (Postgres/MySQL/MariaDB/MongoDB/Redis and common forks) — a raw compose service never becomes a Temps-managed `external_services` row, so it never gets backup/restore. Informational only.
    - `name` string, required
    - `ports` ComposePortMapping[], required: Ports declared by Compose. `target` is the container port Temps can route to; `published` is only the optional Docker host port.
      - `protocol` string: Transport protocol. Compose defaults to TCP.
      - `published` integer, nullable: Optional port published on the Docker host by Compose.
      - `target` integer, required: Port inside the service container. Temps routes traffic to this port.

## Other responses

- `400`: Provider not supported, or the compose file could not be parsed
- `401`: Authentication required for custom GitLab origins
- `403`: Git provider permission required
- `404`: Repository, branch, or compose file not found
- `429`: API rate limit exceeded
- `500`: Internal server error

## Changes

- **2026-09-07** `c2a1f69745e7`: 1 info
  - added the optional property `services/items/health_check_path` to the response with the `200` status
- **2026-09-07** `7a3103561bd0`: 1 warning
  - removed the optional property `services/items/health_check_path` from the response with the `200` status
- **2026-09-07** `ebd376a7af05`: 1 info
  - added the optional property `services/items/health_check_path` to the response with the `200` status
- **2026-09-07** `2a40922f832c`: 3 info
  - added the new optional `query` request parameter `base_url`
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
- **2026-09-07** `38e97c3c35dd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/git/public/:provider/:owner/:repo/compose-file/get.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/3b040526eb43?raw)
