Skip to content
Error Budget LabsOpen app

Set up your repo for Orbit

Most repositories deploy on Orbit with no changes. This page helps you check yours in a few minutes and fix the usual problems before your first deploy. You can do it yourself, or let an AI assistant check your repository against it.

  • Component: one runnable part of your app, such as a website, an API, or a background worker. Orbit builds and runs each component on its own.
  • Lockfile: the file your package manager writes to pin exact versions, such as package-lock.json, yarn.lock, or pnpm-lock.yaml. Commit it.
  • Start command: the command that starts your app, such as npm start.
  • Port: the number your app listens on, such as 3000.

Choose the tab that matches your app. Your choice stays selected for the rest of the page.

What Orbit looks for

Orbit picks the package manager from the lockfile you commit.

If you commit Orbit builds with
package-lock.json in your app’s folder, or no lockfile npm
yarn.lock in your app’s folder Yarn
pnpm-lock.yaml and pnpm-workspace.yaml, both at the top of the repository, with your app in a subfolder pnpm, as a workspace
  • With pnpm, one of the two files alone is not enough.
  • A yarn.lock at the top of the repository is not used for an app in a subfolder.
  • Do not rely on the packageManager field in package.json to switch builds. The lockfile decides.
  • If your app uses Bun, use the Docker tab.

A typical single app

my-app/
├── package.json
├── package-lock.json
└── src/

Pick your Node version

Set it in package.json:

{
"engines": { "node": "22.x" }
}

How it starts

Orbit finds the start command when it reads your repo, and shows it to you before the first deploy (see step 3). It should be the command you use in production, such as npm start or node server.js, not a development command such as npm run dev.

To change how a component builds, commit the lockfile or the Dockerfile you want. Orbit uses it on the next deploy.

Give each component its own folder. A website, an API, and a background worker each get a folder with their own files from step 1.

my-app/
├── web/
│ ├── package.json
│ └── package-lock.json
├── api/
│ ├── requirements.txt
│ └── main.py
└── worker/
├── requirements.txt
└── worker.py

A worker that shares another component’s code does not need its own folder. Add it from the Plan before your first deploy, as in step 3, or later from the dashboard (see Add a worker manually).

  • In a pnpm workspace, keep each component in a subfolder, such as apps/web, not at the top of the repository.
  • Push everything Orbit needs to the branch your environment deploys from. Orbit cannot see files that are not pushed.

You do not need to add a file for this. When Orbit reads your repo, it works out how each component starts. An app built from a Dockerfile runs your CMD.

Before your first deploy

The Plan shows a Start command for each component.

  1. Check each one. It should be the command you use in production.
  2. To change it, click Edit, enter the command, and save.
  3. To run a background worker from the same code, click Add a worker from this component, give it a name and its own command, and click Add worker. A worker always needs a start command.

After your app is running

  1. Click Edit start command.
  2. Enter the start command in the Command field. If you use a Dockerfile, enter the same command as its CMD (with any ENTRYPOINT in front of it).
  3. Click Save. Orbit restarts the component with that command.

If the field shows a command you do not want, clear it and save instead. If your app keeps crashing after you switch to a Dockerfile, a start command saved earlier on the component may be running instead of your CMD.

  • Runtime settings (API keys, feature flags, connection details) go on the component’s Env tab.
  • Build-time settings (values the build needs) go on the Build config tab, as build variables. In a Dockerfile, read one with ARG NAME.
  • Build secrets (tokens and keys for the build) reach Dockerfile builds only. In a Dockerfile, read one with RUN --mount=type=secret,id=NAME. For any other build, use a build variable.
  • Do not commit secrets to the repository.

See Environment variables.

  • Your app must listen on the component’s port. If Orbit chose the wrong one, open the Settings tab, click Edit port, and enter the port your app listens on.
  • Orbit also sets PORT for your app, and a few similar variables, unless you set one of the same name yourself.
  • Optionally set a Health check path in the Settings tab, such as /health. Without one, Orbit checks the port only.
  • If your app redirects every request to HTTPS, a health check path still works, because Orbit sends the X-Forwarded-Proto: https header with each check.
  • Use a light path such as /health. Orbit refuses a deep readiness path such as /ready while the component runs a single instance.
What you see What to do
A pnpm monorepo builds with npm and fails on workspace:*. Put both pnpm-lock.yaml and pnpm-workspace.yaml at the top of the repository, and keep the component in a subfolder.
A Yarn app builds with npm. Commit yarn.lock in the component’s own folder.
The app runs a development command, or the wrong one. Change it with Edit on the Plan, or Edit start command after deploy, as in step 3.
The app keeps crashing after you added a Dockerfile. Set the start command to your CMD, as in step 3.
Orbit ignores my Dockerfile. Only Dockerfile in the component’s own folder is found on its own. For any other path, use Edit dockerfile.
The build cannot see a value it needs. Add it as a build variable on the Build config tab.
A static site builds as a Node app. Remove the package.json or Dockerfile from its folder.

After a change, push and deploy. See Deploy & release.

For the full text of every Orbit docs page in one file, point your assistant at https://docs.errorbudgetlabs.com/llms-full.txt. For a short index of the pages, use https://docs.errorbudgetlabs.com/llms.txt.