ReferenceBlueprint spec
Build keys
The build keys tell Ferry where to build, with which Dockerfile and with which commands.
services:
- type: web
name: api
runtime: node
repo: https://github.com/render-examples/express-hello-world
buildCommand: npm ci # runs in the build
startCommand: node app.js # starts the appThese keys control the build of a service and the command that starts it.
The keys
| Key | Type | Default | Ferry setting and notes |
|---|---|---|---|
rootDir | string | repository root | root_dir: the root directory, a relative path in the repository. It is also the build context. |
dockerContext | string | none | Ferry uses it as root_dir when the entry has no rootDir. |
dockerfilePath | string | Dockerfile | dockerfile_path, relative to the root directory. |
buildCommand | string | none | build_command, for native runtimes. |
startCommand | string | none | start_command. |
dockerCommand | string | none | The same as startCommand. |
staticPublishPath | string | none | publish_dir: the directory that a static site serves. |
- When
dockerContextbecomes the root directory, Ferry makesdockerfilePathrelative to it. - If the entry has
rootDir, Ferry ignoresdockerContextwith a warning. dockerfilePathcan use.., but the path must stay in the repository.- If Ferry finds the runtime from your files, a custom
dockerfilePathmakes the service build with Docker.
- For the
dockerandimageruntimes, the command runs as/bin/sh -c <command>. - If the entry has
startCommandand a differentdockerCommand, Ferry usesstartCommandand gives a warning.