launchroom
Builds

How builds work

How a commit becomes a health-checked, routed release. Your Dockerfile wins, presets and Railpack cover the rest, and every deployment is an immutable image.

Every push becomes an immutable image and a health-checked rollout. Traffic switches only after the new version answers. Each step is visible as it runs, and you can roll back to an earlier deployment in seconds without rebuilding.

Deployment 'fix: order totals with discounts' of the web service in production: Live, 1m 51s, built on control plane, with the steps Plan, Build, Roll out, Health check and Switch traffic all done.Deployment 'fix: order totals with discounts' of the web service in production: Live, 1m 51s, built on control plane, with the steps Plan, Build, Roll out, Health check and Switch traffic all done.
Every step of a deployment, with its duration and logs.

How launchroom picks a builder

After cloning your repository on a build server, launchroom resolves the builder for each app service in this order:

  1. Your explicit choice. Settings → Build → Builder: Automatic, Railpack, Dockerfile or Static files.
  2. Your Dockerfile. With Automatic, a Dockerfile (or Containerfile) at the configured path wins. The deployment says it builds with your Dockerfile.
  3. A launchroom preset plus Railpack. When a framework preset matches, it adjusts Railpack's plan where the defaults aren't production-grade.
  4. Plain Railpack. Everything Railpack can plan builds without a Dockerfile.

launchroom never switches builders silently. If your Dockerfile looks like a development setup (its CMD runs npm run dev, vite, artisan serve or runserver, or the file is named *.dev), you get a warning and a suggestion, and the build still uses your Dockerfile. When nothing can plan the app, launchroom shows what Railpack found. You can then set build and start commands yourself, or generate a Dockerfile if your instance has that turned on.

The plan, before anything builds

When you add a repository, and before every deploy whose build inputs changed, launchroom runs a plan on a build server. It clones, detects and prepares a build plan in a few seconds. Settings → Build shows the result, with:

  • the detected framework, package manager and runtime, with versions and where each came from (.nvmrc, package.json, …)
  • install, build and start commands, the port and the health path
  • the release command, if a preset proposes one
  • build-time variables, and variables your code references that aren't defined yet
  • each preset decision as a removable chip

Every detected value has an Override switch. Overrides are stored in launchroom and never written to your repository. Detect again re-runs the plan, and View plan JSON shows Railpack's raw plan.

Ejecting to railpack.json

To keep the build settings with your code, the Keep it with your code card downloads a railpack.json with the effective settings: your overrides, otherwise the detected values. Commit it and Railpack reads it on the next build.

Framework presets

Presets are versioned and compose with Railpack instead of replacing it. Each one sets what the framework needs to run behind launchroom: variables, proxy trust, secrets, the release command, worker processes, the health path and volume suggestions. The framework guides list everything per framework.

PresetWhat it does
Next.jsSets HOSTNAME=0.0.0.0 and turns telemetry off. From Next.js 15.4, builds through the launchroom deployment adapter (below). Generates NEXT_SERVER_ACTIONS_ENCRYPTION_KEY once per service. Sets up Auth.js when it is installed.
Nuxt, SvelteKit, Astro, React Router, Remix, TanStack Start, Angular SSR, GatsbyStarts the server each framework builds, checks the adapter, and puts the health check under the app's base path.
Node servers (Express, Fastify, Hono, Koa, Nest)Marks requests that came in over HTTPS as secure, starts Nest's compiled app, and warns about a hard-coded listen(3000) or a missing start script.
LaravelRuns migrations as the release command, caches config at container start, generates APP_KEY, sets APP_URL, passes on the visitor's IP, suggests queue (or Horizon), scheduler and Reverb processes, and reads the health path from bootstrap/app.php.
Symfony, plain PHPRuns Doctrine migrations as the release command, generates APP_SECRET, trusts launchroom's proxy, passes on the visitor's IP, and serves public/ when that is where index.php is.
DjangoStarts with gunicorn (uvicorn or daphne for ASGI), runs collectstatic and migrate, generates SECRET_KEY, allows the environment's domains in ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS, and suggests Celery processes.
FastAPI, Flask, LitestarFinds the app object and sets the start command. Trusts launchroom's proxy.
RailsRuns in production mode, generates SECRET_KEY_BASE, runs db:prepare as the release command, asks for RAILS_MASTER_KEY, uses /up and suggests Sidekiq, GoodJob or Solid Queue.
PhoenixSets PHX_SERVER and PHX_HOST, generates SECRET_KEY_BASE and runs the release module's migrations.
Java, Spring BootSizes the heap to the memory limit, trusts launchroom's proxy and uses the Actuator health path.
.NET, Rust Rocket, DenoTrusts launchroom's proxy (.NET), listens on the service's port (Rocket) or defaults to port 8000 (Deno).
Static sites (Vite, Create React App, Angular, static Astro, Next.js export)Builds, then serves the output folder with Caddy on port 8080, with cache headers for hashed assets and real 404 pages for multi-page sites.

Railpack covers the rest, including Go and Bun. With your own Dockerfile, launchroom still applies the runtime part of the matching preset. See Dockerfiles.

Each preset decision shows as a chip under Settings → Build → Preset decisions. Hover a chip to read what it does. Select × on a chip and save to build without it; the next deploy rebuilds. + restores it.

PHP database drivers

A PHP app only gets the database drivers its composer.json asks for. An app written for SQLite has no ext-pdo_pgsql, so on Postgres it fails with "could not find driver". launchroom knows which databases you connected, so it adds their drivers to the build for you, for Laravel and any other PHP app that Railpack builds:

Connected databasePHP extension
PostgreSQLpdo_pgsql
MySQLpdo_mysql
Redis, Valkeyredis
MongoDBmongodb

launchroom also reads composer.lock and adds the extensions your dependencies need, for example intl for Filament or zip for spreadsheet packages. Laravel always gets pcntl, so queue workers can finish the current job when they stop. When the lockfile needs a newer PHP than composer.json allows, the build uses that PHP version and says why, for example "Uses PHP 8.4: composer.lock needs it (symfony/clock)".

Your repository stays as it is. The build log and the detected panel show what was added, for example "Adds PHP extensions: pdo_pgsql (for postgres)". Connecting a new database therefore rebuilds the app, and the staged changes say why: "adds the PostgreSQL driver (pdo_pgsql)". A worker or cron runs its app's image, so its connections count for the app.

If the app builds from your own Dockerfile, install the extensions there (for example with install-php-extensions pdo_pgsql). launchroom shows a warning naming the ones it would need.

HTTPS, visitor IP and logs for PHP apps

Railpack serves PHP apps with FrankenPHP. launchroom adjusts its configuration for every PHP app it builds with Railpack (Laravel, Symfony or plain PHP):

  • PHP knows the request came over HTTPS. launchroom terminates HTTPS in front of the app, so the app itself only sees plain HTTP. launchroom sets $_SERVER['HTTPS'] to on for requests that came in over HTTPS, so asset(), url() and redirects produce https:// links.
  • PHP sees the visitor's address. FrankenPHP trusts X-Forwarded-For from launchroom's proxy and sets REMOTE_ADDR to the visitor's IP, so rate limits, logs and request()->ip() work without trustProxies in your code. This is the Pass on the visitor's IP address chip.
  • Logs stay readable. FrankenPHP logs at info level instead of writing a debug line for every request.

The build log says "Adjusted the PHP server for launchroom". If your repository has its own Caddyfile, launchroom leaves it as it is. To get the same behaviour there, set env HTTPS in php_server from the X-Forwarded-Proto header, and add trusted_proxies static private_ranges 100.64.0.0/10 to the global servers options. launchroom always sets both headers itself and never takes them from the client.

The Next.js adapter

From Next.js 15.4, the Next.js preset injects the @vantezzen/launchroom-next-adapter deployment adapter without changing your repository. launchroom goes by the version in your lockfile, else the range in package.json. The adapter builds Next's standalone output, ties static assets to the deployment, and starts the app with node .next/standalone/server.js. The image contains only the standalone output and the Node toolchain. In launchroom's tests this made it about a third smaller than next start. The build panel shows what the adapter found: routes, middleware, image optimization and ISR routes. If your next.config sets its own adapterPath, yours wins. Remove the launchroom deployment adapter chip to build with next start instead.

Next.js 14 to 15.3 get NEXT_DEPLOYMENT_ID at build time, so a browser tab from the previous version keeps loading its own assets. With output: 'standalone', launchroom copies the static assets into the standalone folder.

Monorepos

When the root directory sits inside a JavaScript workspace (pnpm-workspace.yaml, or workspaces in package.json), launchroom builds from the workspace root so workspace packages resolve. It runs a build filtered to the app and its dependencies, and starts the app from its folder:

ToolBuild command
Turborepoturbo run build --filter=<app>...
Nxnx run <app>:build
pnpmpnpm --filter <app>... run build
yarnyarn workspace <app> run build
npmnpm run build --workspace=<app> --if-present
Bunbun run --filter <app> build

An app with its own lockfile, or with a non-Node manifest such as composer.json or pyproject.toml, builds on its own as before. A Dockerfile in a workspace app builds from the workspace root when it runs turbo prune or refers to the app's folder. See monorepos for watch paths.

Build settings

SettingWhereNotes
Root directorySettings → SourceWhere the app lives in the repository. Inside a JavaScript workspace, the build runs from the workspace root. See monorepos.
Install, build commandsSettings → Build → CommandsOverride only what differs from the detected values.
Start command, portSettings → DeployChanges restart the service without a rebuild.
Release commandSettings → DeployRuns once per deploy before traffic switches, such as migrations.
Dockerfile pathSettings → BuildShown when the builder is Dockerfile. Defaults to Dockerfile in the root directory.
Build stageSettings → BuildFor a multi-stage Dockerfile: the stage to build (FROM … AS production). The port and start command come from that stage. Defaults to the last stage.
Watch pathsSettings → Build → When to buildOnly pushes that touch these paths deploy. Comma-separated globs. Apps in a workspace have defaults.
Railpack versionSettings → BuildPinned per service, so a Railpack update never changes a build you didn't ask to change.

Changes to build settings are staged like every other change and apply on the next deploy.

Build-time and runtime variables

Most variables are runtime only. Changing one restarts the service with the same image, without a rebuild. Some variables are needed while building, and launchroom recognizes them automatically:

  • prefixes that frameworks bake into the browser bundle: NEXT_PUBLIC_*, VITE_*, PUBLIC_*, REACT_APP_*, EXPO_PUBLIC_*, GATSBY_*
  • build tooling such as SENTRY_AUTH_TOKEN, NODE_OPTIONS, NPM_TOKEN, COMPOSER_AUTH and PIP_INDEX_URL

You can change a variable's exposure under Advanced in the Variables tab. Build-time values reach the build only as BuildKit secrets, never as build arguments, so they don't end up in image layers. The exception is a Dockerfile that declares an ARG with the same name as a non-secret build-time variable. That variable is passed as a build argument. Changing a build-time variable triggers a rebuild, and the staged changes say which services rebuild and which only restart.

Public prefixes are public

Variables like NEXT_PUBLIC_* are baked into the browser bundle and visible to anyone, so they can't be secrets.

Where builds run

Builds run on servers with the Build role. On a single server, that server builds. With several, launchroom prefers the server that built the service last (its BuildKit cache is there), then the least busy one. Each build server runs one build per four cores in parallel, at least one. Builds wait for a free slot before their two-hour timeout starts.

Builds run at low priority with memory reserved for the dashboard and running apps. On one- and two-CPU servers, a CPU cap leaves capacity for other work, and memory limits also reduce parallel build steps. Builds can use a bounded amount of existing swap. On a server with less than 4 GB and no swap, the installer offers a 2 GB swap file; re-run the installer to add it to an existing server. A large app can still need more memory or a separate build server.

BuildKit runs as a rootless system container that launchroomd starts on demand. It is never privileged, and build steps have no way to reach BuildKit's API. An image is built for the CPU architecture of the servers it will run on. An ARM server needs an ARM build server, and an x86 server needs an x86 build server.

Base images and Railpack's images are pulled through launchroom's registry mirror, so upstream outages or rate limits don't break your builds. Build logs are split into steps (clone, plan, install, build, push). Every secret value is masked before a log line leaves the server. The first build has no saved build cache yet: it starts from scratch, which is informational and does not fail the build.

The deployment's Steps section follows new output while the build runs. Scroll up to pause, then use Jump to latest to resume. Search covers every step; Expand all, Wrap, Timestamps, and full-log copy and download are in the same toolbar. A failed step opens at its first error, with error lines highlighted. When the log has errors or warnings, All, Errors and Warnings (each with a count) narrow the steps to those lines.

Images and immutable deployments

A successful build is pushed to the built-in registry on the control plane, tagged with its deployment and referenced by digest. Nothing is ever tagged latest. Each deployment is one image plus one snapshot of the configuration, and it never changes afterwards.

If an image with the same build inputs already exists, launchroom skips the build and reuses it. Build inputs are the commit, root directory, builder settings, Railpack version, build-time variable values and platform. Because of this, changing a runtime variable only restarts the service, and promoting staging to production usually reuses the staging image.

Workers and cron jobs share the image of their parent app. One build covers the web process, the queue and the scheduler.

The deployment steps

A deployment moves through these steps, each shown with its own log:

  1. Plan, only when the plan is out of date.
  2. Build, skipped when the image can be reused.
  3. Release, only when a release command is set. It runs once, in the new image, before any traffic moves. If it exits non-zero, nothing rolls out and the current version keeps serving.
  4. Roll out: new replicas start next to the old ones.
  5. Health check: launchroomd checks every new replica.
  6. Switch traffic: the edge servers route to the new replicas and the old ones drain.

A newer push replaces queued deployments of the same service and cancels a build that is still running for an older commit. A failed deployment shows the reason in words, for example a lockfile out of date, a start command that doesn't exist in the image, an image built for another processor or a health check timeout. Where launchroom can fix the cause, the failure card has a button for it. Your site keeps serving the previous version. See build troubleshooting and health checks.

A start command that doesn't exist or isn't executable, an image for another processor, a missing image or one the server may not read fails the deployment at once, without waiting for the health check timeout.

When a service has no port set and the app listens on exactly one port, launchroom sets that port and deploys again. The deployment says "Your app listens on 8000, so launchroom set web's port to 8000 and deployed again." A port you set is never changed.

If the build declares a secret it needs from you, such as RAILS_MASTER_KEY, and the service doesn't have it, the deployment stops after the build and names the variable to add.

Health checks

launchroomd checks each new replica from outside the container, so your image doesn't need curl. Choose the check in Settings → Deploy → Health check:

  • HTTP: GET on the path. On the default path /, any answer below 500 counts, so an app without a home page still passes. A path you set, or one a preset sets (such as /up for Laravel and Rails or /actuator/health for Spring Boot), expects a 2xx or 3xx answer.
  • TCP: the port accepts a connection.
  • None: for workers and cron jobs, "running without exiting" counts as healthy.

The HTTP check asks for the service's domain (the first custom domain, else the generated one) with X-Forwarded-Proto: https, the way a visitor's request arrives. An app that only allows its own domains, such as Django with ALLOWED_HOSTS or Rails with config.hosts, answers it normally. If the app refuses its own domain, the check fails and the deployment explains which setting to change.

You can configure the time to start, check interval, answer timeout and the number of failures before a replica is unhealthy. A Dockerfile HEALTHCHECK is not used: launchroom only goes by its own check. Traffic only switches after the new replicas pass. If they don't, the deployment fails and the old version keeps serving.

Restart when stuck (Settings → Deploy → Health check) restarts a running replica whose check passed once and then keeps failing for 5 minutes, at most 3 times an hour. After that, launchroom leaves it alone until the check passes again. Change the time from 1 to 60 minutes, or switch it off. Databases are never restarted for this.

When no replica of a service passes its check, the edge still sends traffic to the replicas that are running instead of answering with an error page for everyone.

Rolling updates

A service with several replicas updates one replica at a time: start a new replica, wait until it is healthy, add it to the routes, drain an old one, and repeat. Old replicas keep answering for the drain time (10 seconds by default, Settings → Deploy → Rollout) before they stop. A single replica starts its new version next to the old one and switches when healthy.

A service that keeps data in a volume, and every database, stops the old version before the new one starts, because two copies can't safely share one data directory. Deploys of these services have a short downtime. For an app that handles two copies on its data, switch on Two copies during a deploy under Settings → Deploy → Rollout. See scaling.

A stopping replica gets SIGTERM and time to finish its work before it is killed: 10 seconds for web services, 30 seconds for workers and cron jobs, or what the framework needs (60 seconds for Laravel queue workers, Horizon and Celery, 30 seconds for Sidekiq, GoodJob and Solid Queue). Change it under Settings → Deploy → Rollout → Stop timeout, up to 5 minutes.

Rollback

Service panel for api open beside the canvas, Deployments tab: the live deployment 'fix: order totals with discounts' with View logs and Redeploy, and four earlier deployments that can be rolled back.Service panel for api open beside the canvas, Deployments tab: the live deployment 'fix: order totals with discounts' with View logs and Redeploy, and four earlier deployments that can be rolled back.
Click a service to see what is live and roll back in seconds, without a rebuild.

Rolling back points the service at an earlier deployment's image and configuration snapshot. There is no rebuild, and on servers that ran it recently there is no pull. A rollback takes seconds. Roll back from the service's Deployments tab, or with Roll back to this on a deployment page.

  • After a production rollback, automatic deploys pause for that environment so the next push doesn't undo it. A banner shows Resume.
  • Rollbacks don't revert database migrations, and they don't run the release command again.
  • The registry keeps the last 10 images per service. You can't roll back to a deployment whose image is gone, and its button disappears.

Automatic rollback

For 10 minutes after a new version of a production app or image service goes live, launchroom watches it. The deployment says "Watching for problems until 14:32". If it keeps crashing, or every replica is down for 2 minutes, launchroom rolls back once to the previous version:

  • The deployment list marks it Rolled back automatically, with the reason.
  • Automatic deploys pause, as after any production rollback.
  • Database migrations of the failed version are not reverted, and the reason says so.
  • It happens at most once an hour per service.

Previews, staging environments, databases, image services with a volume, workers and cron jobs are never rolled back automatically.

Cleanup and build cache

Every server cleans up once a day, and sooner when its disk passes 85 %:

  • Images: launchroom keeps what is running, the two newest others per service (so rollback needs no pull) and anything from the last hour. It only touches images from its own registry.
  • Build cache on build servers: entries older than 7 days are pruned. 10 GB of cache is kept.
  • Leftover one-off containers from interrupted tasks are removed.

A build that runs out of disk runs the same cleanup at once. When it freed space, the deployment is retried once. A failed deployment that ran out of disk also offers Free space on its failure card.

Volumes are never pruned. Cleanup never touches anything outside launchroom's own labels and registry.

Rebuild without cache

A redeploy of the same commit reuses its image. When a build seems to use something stale, open the deployment's ⋯ menu and choose Rebuild without cache: launchroom builds the commit again from scratch, without cached layers or packages, and deploys it. From a terminal: launchroom redeploy --no-cache.

Next steps

On this page