services
Services by name. A service with cron is a scheduled job; one with no port and no cron is a worker.
- Type: map of names to object
- Since: manifest v1
Example
Section titled “Example”services: web: root: apps/web port: 3000Each entry
Section titled “Each entry”A service. Every field is optional; Guv detects what it can. Under environments.<env>.services the same fields override the base service for that environment (deep merge).
Fields
Section titled “Fields”| Field | Type | What it does |
|---|---|---|
description |
string | What the service does, shown in the dashboard. |
root |
string | Directory of the service in the repository. |
watch |
list of string | Globs of paths that trigger a rebuild on push. |
build |
object | How the service is built. |
start |
string | Start command. |
pre_deploy |
string | Command run once per deployment, in a separate VM with the same variables, before traffic moves (for migrations). |
port |
integer | Port the app listens on. |
healthcheck |
string or object | How Guv decides a new deployment is healthy before moving traffic. |
domains |
list of hostname or object | Custom domains. |
private |
boolean | No public domain; reachable only on the environment’s private network as <name>.guv.internal. |
replicas |
integer or object | Number of copies. |
resources |
object | Limits per replica. |
sleep_when_idle |
boolean | Scale to zero after 10 minutes without requests; the next request wakes it in 1–3 seconds. |
env |
env | Variables for this service. |
volumes |
list of object | Volumes to mount. |
cron |
string | Five-field cron schedule. |
timezone |
string | IANA time zone for cron. |
timeout |
duration | Maximum run time of each cron run. |
concurrency_policy |
forbid, allow, replace |
What to do if a cron run is still going when the next is due. |
restart |
object | Restart behaviour when the process exits. |
overlap |
duration | How long the previous deployment keeps serving after traffic moves. |
auto_rollback |
boolean | Roll back automatically if a new deployment crash-loops or fails health checks. |