Koo Docs
View as Markdown

Service

A workload in an environment — its source, runtime, optional mode, declared domains, and live status. Identified by id; named uniquely within the environment.

Attributes

ServiceDto

A workload in an environment — its source, runtime, optional mode, declared domains, and live status. Identified by id; named uniquely within the environment.

idstringread-only

Unique identifier of the service (read-only).

namestringrequired

Service name — lowercase letters, digits and dashes (3–16 chars, starts with a letter). The name is the service identity within the environment: renaming creates a new service.

type"web" | "postgres" | "redis"required

Service kind: `web` runs your own code; `postgres`/`redis` are managed addons.

cpuintegerrequired

CPU limit in millicores (250, 500, or whole-vCPU multiples of 1000).

memoryintegerrequired

Memory limit in MiB (256, 512, or whole-GiB multiples of 1024).

exposedbooleanrequired

Whether the service is publicly reachable with its own URL (web services only).

sourceobject

Where the deployable artifact comes from.

imagePullCredentialsSetbooleanread-only

Read-only: true when private-image registry credentials are stored for this service. The credentials themselves are never returned.

runtimeobject

Runtime configuration (port, protocol, health check, entrypoint). Variables are managed separately.

serverlessobject

Present when the service runs as a scale-to-zero serverless workload.

cronobject

Present when the service runs as a scheduled cron job.

volumeobject

Present when the service has an attached persistent volume.

locationsobject[]required

Locations this service runs in, each with its replica count.

domainsobject[]required

Read-only: the custom domains routing to this service, with DNS records + live status.

statusobjectread-only

Read-only: live status of the service.

internalHoststringread-only

Read-only: the internal DNS host other services reach this one at, for service-to-service wiring.

connectionRecord<string, string>read-only

Read-only: non-secret connection details for a managed addon (postgres/redis).

The Service object
json
{  "id": "svc_01example0000000000000000x",  "name": "my-app",  "type": "web",  "cpu": 1,  "memory": 1,  "exposed": true,  "source": {    "type": "git",    "git": {      "provider": "github",      "repoUrl": "https://example.com",      "branch": "example",      "autoDeploy": true    },    "image": {      "ref": "example"    }  },  "imagePullCredentialsSet": true,  "runtime": {    "port": 8080,    "protocol": "http",    "healthCheckPath": "example",    "entrypoint": {      "command": "example",      "args": [        "example"      ]    }  },  "serverless": {    "enabled": true  },  "cron": {    "enabled": true,    "schedule": "example"  },  "volume": {    "id": "svc_01example0000000000000000x",    "mountPath": "example",    "sizeGb": 0,    "name": "my-app"  },  "locations": [    {      "name": "my-app",      "replicas": 1    }  ],  "domains": [    {      "hostname": "example",      "mode": "cname",      "status": "pending",      "statusReason": "example",      "dnsRecords": [        {          "type": "TXT",          "name": "my-app",          "value": "example"        }      ]    }  ],  "status": {    "applied": "pending",    "build": "pending",    "health": "online",    "errors": [      {        "source": "applied",        "code": "dns_propagating",        "resource": "example",        "message": "example",        "at": "2026-01-01T00:00:00.000Z"      }    ],    "warnings": [      {        "source": "applied",        "code": "dns_propagating",        "resource": "example",        "message": "example",        "at": "2026-01-01T00:00:00.000Z"      }    ],    "url": "https://example.com",    "lastDeployment": {      "id": "svc_01example0000000000000000x",      "version": 3    },    "appliedAt": "2026-01-01T00:00:00.000Z",    "statusObservedAt": "2026-01-01T00:00:00.000Z"  },  "internalHost": "example",  "connection": {    "key": "example"  }}