Skip to content

Build settings

You set these when you create an app, and change them on the app page under Source and build → Edit settings.

Field Build types Default What it does
Repository all Set when the app is created. It can’t be changed, because that would be a different app.
Branch all the repository’s default branch Pushes to this branch deploy the app, if automatic deploys are on.
Root directory all . (the repository root) The folder that contains the app. Builds run here.
Install command Static, Node.js detected from your lockfile Installs dependencies. See Build types.
Build command Static, Node.js none Runs after installing, for example npm run build.
Start command Node.js npm start Starts your server.
Output directory Static dist with a build command, otherwise . The folder whose files are served.
Port Node.js, Dockerfile 3000 The port your server listens on. Also set as the PORT variable.
Health check path all none See Health check below.

Set this for monorepos, where the app lives in a subfolder such as apps/web. Everything else is relative to it: the install and build run there, the output directory is inside it, and a Dockerfile is looked for there.

If the folder doesn’t exist on the branch, the build stops with “Root directory ‘…’ does not exist in the repository”.

Before visitors are switched to a new version, Shiplon checks it really works:

  • Without a path (the default), the new version must accept connections on its port, and its home page must answer without a server error. Any status below 500 counts, because many apps answer / with a redirect, 401 or 404.
  • With a path, for example /healthz, a GET on that path must answer 2xx or 3xx. If it keeps answering 4xx for over a minute, the deployment stops with a message saying so.

If the check fails, the new version doesn’t replace the old one. The previous version keeps serving, and the deployment is marked Deployment failed.

A good health endpoint is quick, needs no login, and checks what the app needs to serve requests:

app.get("/healthz", async (req, res) => {
await db.query("select 1");
res.status(200).send("ok");
});
App Build type Build command Output / start Port
Plain HTML in the repository root Static none .
Vite (React, Vue, Svelte) Static npm run build dist
Astro (static output) Static npm run build dist
Create React App Static npm run build build
Next.js Node.js npm run build npm start (next start) 3000
Express or Fastify API Node.js none, or npm run build for TypeScript npm start your app’s port
Python, Go, PHP… Dockerfile in your Dockerfile in your Dockerfile the port it listens on

Deploy automatically on push is on by default: every push to the app’s branch starts a deployment. Turn it off to deploy only when you click Deploy. See Deployments and rollbacks.