Commands

Lifecycle commands for build, release, and run stages. Each value is a string (shorthand) or an object with command and optional timeout.

Platforms execute well-known commands in this order: build → release → start. The seed and test commands are invoked on demand, not as part of the standard deploy lifecycle.

Stage Purpose When
build Install dependencies, compile Every deploy
release Migrations, cache clear, asset compilation Every deploy, after build
start Start the application Every deploy, after release
seed Seed the database with initial data On demand (first deploy or explicit trigger)
test Run the test suite On demand (CI or explicit trigger)

Additional named commands are allowed and invoked on demand.

commands:
  build: "npm install"
  release: "npx prisma migrate deploy"
  start: "node server.js"
  test: "npm test"

With timeout:

commands:
  release:
    command: "npx prisma migrate deploy"
    timeout: "5m"
esc
Type to search the docs