service
service(
input:WithMeta<ContainerInput>):ServiceModel
Create a service container model.
Service containers run alongside the job and are accessible via their
key in jobs.<job_id>.services. The input shape is identical to
container, but the returned model is branded as a
ServiceModel so it can only be placed in the services map.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
|
Container configuration and optional metadata. |
Returns
Section titled “Returns”ServiceModel
A branded ServiceModel.
Example
Section titled “Example”const redis = service({ image: "redis:7", ports: ["6379:6379"],});