Environments and previews
← Docs · Run in production

Environments and previews

Staging copies of a whole project, and a preview for every pull request.

  • Projects group services; environments (production, staging…) are full copies of a project, created from the canvas with + Environment. References like ${{api.RAILYARD_PRIVATE_URL}} resolve inside the same environment.
  • Pull-request previews: turn previews on for an app; with GitHub connected every PR gets its own copy, removed when the PR closes.
  • Sleep when idle: on Settings → General, choose never, 10 minutes, 30 minutes, 1 hour, 6 hours or 1 day of no traffic before an app sleeps; the next request wakes it. New staging and preview apps default to 30 minutes. CLI: railyard sleep <app> <10|30|60|360|1440|off>.
  • Awake hours: set the days and a start/end time (in the app’s time zone) it should stay up; outside those hours it sleeps after a short grace period and wakes on the next request, same as idle sleep. Leave it unset to allow traffic at any time.