Skip to content
Unsnag

services

Sidecars started for every Run, by name.

Type: mapping of <service> → mapping

Hint: map each service's name to its image or build, port and ready probe

Keys

services.<service>.image

A Docker image to run.

Type: string
Required: exactly one of image, build

Hint: name a Docker image, such as nginx:1.27

services.<service>.build

A Dockerfile to build, relative to the project root. Its build context is build_root (the project root by default) without unsnag/, and every secret, build or Run, is a build secret.

Type: string
Required: exactly one of image, build

Hint: give a Dockerfile path relative to the project root

services.<service>.port

The port the service listens on.

Type: integer (≥ 1, ≤ 65535)
Required: yes

Hint: give the port the service listens on, such as 8080

services.<service>.ready

How Unsnag knows the service is ready: an HTTP path that answers 2xx, or an open TCP port (the default). Not ready in time makes the Run error.

Type: mapping

Hint: write ready: { http: /health } or ready: { tcp: true }

services.<service>.ready.http

A path that answers 2xx once the service is ready.

Type: string
Required: exactly one of http, tcp

services.<service>.ready.tcp

Wait until the port accepts connections.

Type: boolean
Required: exactly one of http, tcp

services.<service>.ready.timeout

How long to wait for the service to be ready.

Type: string or number (> 0)
Default: 60s

Hint: write a duration such as 90s, 15m or 1h, or a number of seconds

services.<service>.known_gaps

What the Mock does not reproduce faithfully, shown on the Report.

Type: list of string

Hint: list short descriptions of what the Mock gets wrong