Render

Reylo Migrate on Render

Run your migrations as your service's pre-deploy command:

render.yaml
services:
  - type: web
    name: app
    runtime: node
    # ...
    preDeployCommand: npx reylo migrate deploy

It runs after the build, on an instance of its own. A migration that fails stops the deploy, and the previous one keeps serving. Pre-deploy commands need a paid plan.

Database

Declare your database in the Blueprint, and set DATABASE_URL from it:

render.yaml
databases:
  - name: db

services:
  - type: web
    name: app
    # ...
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: db
          property: connectionString

Builds

A build that type-checks reads your schema before the pre-deploy command migrates it. Give it a database of its own.

Other images

A Next.js standalone build, or any image without your node_modules, has no reylo command. Copy it from Reylo's image, with your reylo directory:

Dockerfile
COPY --from=ghcr.io/reylosql/reylo:0.8.3 /usr/local/bin/reylo /usr/local/bin/reylo
COPY reylo/ reylo/

Copy .reylo.yaml too, if you have one. Then run it directly:

render.yaml
services:
  - type: web
    name: app
    runtime: docker
    # ...
    preDeployCommand: reylo migrate deploy
Released under the MIT License. Copyright © 2026 Colin McDonnell.

On this page

reylosql/reylo