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.
Words used on this page
Section titled “Words used on this page”- 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, orpnpm-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.
1. Pick your stack
Section titled “1. Pick your stack”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.lockat the top of the repository is not used for an app in a subfolder. - Do not rely on the
packageManagerfield inpackage.jsonto 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.
What Orbit looks for
Orbit builds a Python app from its dependency file: requirements.txt, Pipfile, or pyproject.toml.
A typical single app
my-app/├── requirements.txt├── .python-version└── main.pyPick your Python version
Orbit supports Python 3.10 to 3.14. Set yours in one of these files:
.python-version, containing a version such as3.12Pipfilepyproject.toml
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 run a production server, such as gunicorn or uvicorn, not a development server such as flask run or manage.py runserver.
What Orbit looks for
Orbit builds a Go app from its go.mod file.
Commit go.mod and go.sum in your app’s folder.
A typical single app
my-app/├── go.mod├── go.sum└── main.goIf you need more control over how it builds, use the Docker tab.
What Orbit looks for
A folder with an index.html, and no package.json and no Dockerfile, is served as a static site.
my-site/├── index.html├── style.css└── images/If your site has a build step, such as npm run build, use the Node.js tab, or the Docker tab to build it and serve the result.
When to use a Dockerfile
Use a Dockerfile when you want full control, or when your app uses a language or tool the other tabs do not cover, such as Bun.
A Dockerfile in a component’s folder wins over everything else.
A typical single app
my-app/├── Dockerfile└── (your code)An example for Node.js
FROM node:22-slimWORKDIR /appCOPY package*.json ./RUN npm ci --omit=devCOPY . .EXPOSE 3000CMD ["node", "server.js"]Rules for your Dockerfile
- Name it
Dockerfileand put it in the component’s own folder. - Make the app listen on the component’s port.
- End with a
CMDthat starts the app. - If the Dockerfile is at the top of the repository and the component is in a subfolder,
COPYpaths start at the top of the repository. Otherwise they start at the component’s folder. - If your Dockerfile has another name or lives in another folder, open the component’s Settings tab, click Edit dockerfile, and enter its path from the top of the repository.
To change how a component builds, commit the lockfile or the Dockerfile you want. Orbit uses it on the next deploy.
2. If your repo has more than one part
Section titled “2. If your repo has more than one part”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.pyA 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.
3. Check the start command
Section titled “3. Check the start command”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.
- Check each one. It should be the command you use in production.
- To change it, click Edit, enter the command, and save.
- 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
- Click Edit start command.
- Enter the start command in the Command field. If you use a Dockerfile, enter the same command as its
CMD(with anyENTRYPOINTin front of it). - 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.
4. Put each setting in the right place
Section titled “4. Put each setting in the right place”- 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.
5. Set the port and a health check
Section titled “5. Set the port and a health check”- 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
PORTfor 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: httpsheader with each check. - Use a light path such as
/health. Orbit refuses a deep readiness path such as/readywhile the component runs a single instance.
Common issues
Section titled “Common issues”| 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.
Next steps
Section titled “Next steps”- Deploy your first app - from a repo to a live app
- Add a component - add a worker or another service later
- Troubleshooting - fixes for common problems
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.