Cloud
The service settings object
Everything that decides how a service is built, started and sized. Read it, change the fields you want and send base_generation back, so a change made by someone else in between is never overwritten.
Attributes
generationnumber: The settings' version. Send it as base_generation when you change them.source_kindstring: repo or image.repo_idstring: The GitHub repository, for a repo service.branchstring: The branch it deploys from.root_dirstring: The folder of the repository to build, relative to its root.watch_pathsarray: Only pushes that change these paths deploy. Empty means every push.image_refstring: The image, for an image service.builderstring: railpack (detects the stack) or dockerfile.dockerfile_pathstring: The Dockerfile, for the dockerfile builder.build_cmdstring: Overrides the build command.start_cmdstring: Overrides the start command.restart_policystring: always, on_failure or never.max_restartsnumber: For on_failure: restarts before giving up. 0 retries forever with backoff.cpu_millisnumber: CPU per replica in millicores, 50 to 64000.memory_mbnumber: Memory per replica in MB, 64 to 262144.disk_mbnumber: Temporary disk per replica in MB, whole GB from 1024 to 102400. Wiped on every deploy.replicasnumber: Replicas a deployment runs, 1 to 10. A service with a volume runs one.healthcheck_pathstring: The path the platform probes before sending traffic. Empty: a TCP check.healthcheck_timeout_snumber: Seconds before one check fails, or null for the default (3).healthcheck_interval_snumber: Seconds between checks, or null for the default (5).stop_grace_snumber: Read only: seconds a replica gets to stop. 10, or 30 with a volume.has_volumeboolean: Read only: a volume is attached.
Example
{
"data": {
"generation": 7,
"source_kind": "repo",
"repo_id": "gh-918273645",
"branch": "main",
"root_dir": "apps/api",
"watch_paths": ["apps/api/**"],
"image_ref": "ghcr.io/acme/api:1.4.2",
"builder": "railpack",
"dockerfile_path": "Dockerfile",
"build_cmd": "npm run build",
"start_cmd": "node dist/server.js",
"restart_policy": "on_failure",
"max_restarts": 5,
"cpu_millis": 1000,
"memory_mb": 1024,
"disk_mb": 2048,
"replicas": 2,
"healthcheck_path": "/healthz",
"healthcheck_timeout_s": 5,
"healthcheck_interval_s": 10,
"stop_grace_s": 10,
"has_volume": false
}
}