ServiceConfig
Settings of a service. Every field is optional in updates; PATCH uses JSON Merge Patch semantics (null clears).
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
source |
ServiceSource | |
build |
BuildSettings | |
start |
string or null | Start command. Detected when empty. |
pre_deploy |
string or null | Runs once per deployment in a separate VM before traffic moves; failure stops the rollout. |
port |
integer or null | |
healthcheck |
Healthcheck or any or null | |
resources |
ServiceResources | |
replicas |
Replicas | |
sleep_when_idle |
boolean | Scale to zero after 10 idle minutes; the first request wakes it in 1–3 s. |
private |
boolean | No public domain; reachable only on the environment’s private network. |
cron |
CronSettings or any or null | |
restart_policy |
object | |
deploy |
object | |
volumes |
array of VolumeMount |
* always present
Example
Section titled “Example”{ "source": { "kind": "git", "repo": "string", "root": "apps/web", "watch": [ "apps/web/**", "packages/ui/**", "pnpm-lock.yaml" ], "image": "ghcr.io/acme/api:1.4.2", "registry_credentials_secret": "string" }, "build": { "builder": "railpack", "dockerfile": "services/api/Dockerfile", "context": "string" }, "start": "pnpm --filter web start", "pre_deploy": "pnpm --filter db migrate deploy", "port": 3000, "healthcheck": { "type": "http", "path": "/healthz", "port": 1, "timeout_seconds": 10, "interval_seconds": 10, "start_timeout_seconds": 300 }, "resources": { "cpu": 1, "memory_mb": 1024 }, "replicas": { "min": 1, "max": 1, "scale_on": { "cpu_percent": 10, "memory_percent": 10, "concurrency": 1 } }, "sleep_when_idle": false, "private": false, "cron": { "schedule": "0 2 * * *", "timezone": "Europe/London", "timeout_seconds": 1, "concurrency_policy": "forbid" }, "restart_policy": { "mode": "on_failure", "max_retries": 10 }, "deploy": { "overlap_seconds": 20, "auto_rollback": false }, "volumes": [ { "volume": "string", "mount_path": "/data" } ]}