Dawnrose

Docs Build and deploy

dawnrose.json

A dawnrose.json file in your source sets the build and deploy settings of the service, so they live in version control next to the code.

Example

{
  "build": {
    "builder": "AUTO",
    "installCommand": "npm ci",
    "buildCommand": "npm run build"
  },
  "deploy": {
    "startCommand": "node dist/server.js",
    "preDeployCommand": ["npm run migrate"],
    "port": 3000,
    "healthcheckPath": "/health",
    "healthcheckTimeout": 120,
    "numReplicas": 2,
    "restartPolicyType": "ON_FAILURE",
    "restartPolicyMaxRetries": 5,
    "overlapSeconds": 10,
    "drainingSeconds": 15
  }
}

Where Dawnrose looks

At build time, Dawnrose looks in the service’s root directory first and then at the repository root. In each place it uses dawnrose.json if it exists. The build log says which file it used (Using settings from dawnrose.json), and the deployment records it.

The file applies to services built from source: GitHub repositories and uploaded files. A service that runs a Docker image has nothing to build, so the file is not read.

If the file is not valid JSON, the build fails with the parse error.

How it combines with service settings

Values in the file override the service’s own settings for that deployment. Settings the file leaves out keep their values from the service. Fields with empty values, such as "", are ignored.

The dashboard’s Settings tab keeps showing the service’s own values, not the ones from the file. A redeploy or rollback that reuses an earlier image also reuses the file settings of that deployment.

Plan limits still apply: a numReplicas above your plan’s limit fails the deployment, and so does more than one replica on a service with a volume.

build

FieldTypeMeaning
builderstringAUTO, DOCKERFILE or NIXPACKS, in any case. Any other value means AUTO. Nixpacks builds aren’t available. See Builds.
dockerfilePathstringPath of the Dockerfile, relative to the root directory. Must stay inside the source.
installCommandstringReplaces the detected install command.
buildCommandstringReplaces the detected build command.

installCommand and buildCommand are used by zero-config builds. A Dockerfile build runs only what the Dockerfile says.

deploy

FieldTypeMeaning
startCommandstringReplaces the image’s entrypoint; runs through sh -c.
preDeployCommandstring or array of stringsRuns before the new version takes traffic. An array is joined with &&.
portnumberThe port Dawnrose routes traffic to and sets as PORT.
healthcheckPathstringPath that must return 2xx before the deployment takes traffic.
healthcheckTimeoutnumberSeconds to wait for the healthcheck to pass, up to your plan’s limit.
numReplicasnumberNumber of replicas.
restartPolicyTypestringON_FAILURE, ALWAYS or NEVER. Other values mean ON_FAILURE.
restartPolicyMaxRetriesnumberRestarts allowed with ON_FAILURE.
cronSchedulestring5-field crontab in UTC. Turns the service into a cron service.
overlapSecondsnumberSeconds the old version keeps running after the new one is live.
drainingSecondsnumberSeconds between SIGTERM and SIGKILL when old replicas stop.
autoRollbackbooleanRoll back by itself when a new deployment keeps crashing in its first 10 minutes. Default true. See Automatic rollback.

Each field matches a setting under Settings → Build, Settings → Deploy or Settings → Networking, described in Deploying.