5050cloud

Config file schema

The fields railway.json, railway.toml, 5050.yaml and 5050.json accept, with what each one sets.

Files

The first of 5050.yaml, 5050.json, railway.json, railway.toml in the root directory is used, or the file named in Settings > Source > Config file path.

Fields

FieldSetsService setting
build.builderRAILPACK, DOCKERFILE or NIXPACKS (built with Railpack)build.builder
build.buildCommandBuild commandbuild.buildCommand
build.dockerfilePathDockerfile pathbuild.dockerfilePath
build.watchPatternsWatch pathsbuild.watchPaths
build.railpackVersionRailpack versionbuild.railpackVersion
deploy.startCommandStart commanddeploy.startCommand
deploy.preDeployCommandPre-deploy commanddeploy.preDeployCommand
deploy.healthcheckPathHealth check pathdeploy.healthcheckPath
deploy.healthcheckTimeoutHealth check timeout in secondsdeploy.healthcheckTimeoutSec
deploy.restartPolicyTypeON_FAILURE, ALWAYS or NEVERdeploy.restartPolicy
deploy.restartPolicyMaxRetriesMaximum restartsdeploy.restartMaxRetries
deploy.cronScheduleCron scheduledeploy.cronSchedule
deploy.numReplicasReplicasdeploy.replicas
deploy.multiRegionConfigReplica count only (sum of the regions)deploy.replicas
deploy.overlapSecondsOverlap secondsdeploy.overlapSec
deploy.drainingSecondsDraining secondsdeploy.drainingSec
deploy.sleepApplicationIgnored with a notice
deploy.processes (5050 files only)Processes, or autodeploy.processes
deploy.placement (5050 files only){roles, hosts}deploy.placement
deploy.singleton (5050 files only)Singletondeploy.singleton
environments.<name>The same fields, for one environment

Example 5050.yaml

build:
  builder: RAILPACK
  watchPatterns:
    - /api/**
deploy:
  startCommand: node server.js
  healthcheckPath: /health
  processes: auto
environments:
  production:
    deploy:
      numReplicas: 2

YAML keys are camelCase, as in JSON.

Rules

  • Priority: the current environment's block, then the top-level fields, then the console settings.
  • Unknown fields fail the build with the line number and a suggestion.
  • Fields set by the file are locked in the console and marked with a file icon.

Next steps

View as Markdown · Edit this page