Frameworks and build settings

What Lahyer detects in your repository, how it builds each framework, and the settings you can change.

When you import a repository, Lahyer reads it and fills in the build settings. You can change any of them before the first deployment and later on the project's Settings tab.

Supported frameworks

FrameworkDetected fromRuns as
Next.jsnext in package.jsonA Node.js server (standalone output), or static files from out/ with output: "export"
Astroastro in package.jsonStatic files from dist/, or a Node.js server with output: "server" and @astrojs/node in standalone mode
SvelteKit@sveltejs/kit in package.jsonA Node.js server with adapter-node, or static files with adapter-static
Nuxtnuxt in package.jsonA Node.js server from .output/, or static files from .output/public/ when the build runs nuxt generate
Remix / React Router@react-router/dev or @remix-run/dev in package.jsonA Node.js server from build/, or static files from build/client/ with ssr: false
Angular@angular/core in package.jsonStatic files: the browser build from angular.json
Vitevite in package.jsonStatic files from dist/
Create React Appreact-scripts in package.jsonStatic files from build/
Static siteAn index.html with no package.json, or no build scriptYour files as they are
DockerfileA Dockerfile in the root directoryYour container

Single-page apps (Vite, Create React App, Angular, React Router with ssr: false) answer paths that have no file with index.html, so client-side routing works after a refresh.

Each framework has a hosting guide on lahyer.com with more detail, for example Next.js and Astro.

Build settings

SettingWhat it does
Root directoryWhere the app lives in the repository, such as apps/web in a monorepo. Lahyer builds from there and reads lahyer.json there.
FrameworkThe detected framework. Choose Dockerfile to build from your Dockerfile when a framework is also found.
Runs asStatic files, served from the edge, or Node.js server, which runs your Node.js process.
Package managernpm, pnpm, Yarn or Bun, chosen from the packageManager field or your lockfile.
Install commandDefaults to your package manager's install.
Build commandYour build script, or the framework's own build.
Output directoryWhere static files end up, such as dist.
Node.js version20 or 22, read from .nvmrc, .node-version or engines.node; 22 when none is set.

While importing, change the root directory and choose Detect again to have Lahyer read the repository from there.

Next.js

Lahyer asks Next.js for standalone output during the build, so most apps deploy unchanged, with the App Router, the Pages Router and route handlers working as they do under next start. If your next.config sets output itself, or the app sits in a monorepo, wrap the config with withLahyer from the @lahyer/next package.

Dockerfile apps

Lahyer builds the image from your Dockerfile (in the root directory, or at the Dockerfile path you set) and runs the container.

  • Port: the Port setting when you set one, otherwise the first port your Dockerfile EXPOSEs, otherwise 3000. Lahyer passes it to the container as PORT.
  • Build arguments: a project environment variable reaches the build only when the Dockerfile declares it with ARG. The running container receives all of them.

Server apps and static sites

Static sites are served from the edge with no server to keep awake. Server apps run on Node.js (or as your container), sleep after five quiet minutes and wake on the next request. See Core concepts.

On this page