Service settings as code

A service can carry its settings in a file at the repository root. The same file works for Docker Host and for Services:

  • miosa.app.yml, miosa.app.yaml or miosa.app.json, and
  • miosa.json.

railway.json is read as a compatible fallback, so a project imported from Railway needs no edit first.

Rules

Only the fields the file names change. A file with one key leaves every other setting as the project has it. A file is an addition, not a replacement.

The API still validates. The merged settings go through the same validation as a console save, so a file cannot write a value the API would refuse.

The file wins over the console for the fields it names. The console shows which fields came from the file.

Fields

File keySettingApplies to
deploy.start / startCommand / start_commandStart commandall
deploy.preDeploy / preDeployCommandPre-deploy commandall
deploy.healthcheckPath / healthcheck_pathHealth check pathweb services
deploy.healthcheckTimeoutHealth check timeout, secondsweb services
deploy.restartPolicy / restartPolicyTypealways, on_failure or neverall
deploy.maxRetries / restartPolicyMaxRetriesRetries before giving upall
deploy.replicas / numReplicasReplicasall
deploy.cron / cronScheduleFive-field schedulecron services
deploy.regionus-east, us-west or us-miaall
deploy.sleep / sleepApplicationSleep when idle, five minutes by defaultweb services with a public address
build_commandBuild command, Railpack builds onlystatic services
output_dirDirectory to serve, relative to the appstatic services

variables are read as names; values are not taken from the file.

What the file cannot carry

Keys with no equivalent are reported in the plan and in the console rather than dropped quietly: build.builder, build.dockerfilePath, and anything unknown.

Was this page helpful?