Vidulividuli

Javascript/Typescript

Comprehensive information about Javascript/Typescript app configuration.

Common Settings

The section outlines common settings and behaviours for Javascript/Typescript projects.

Node Version

The node version is automatically detected from .node-version file in the root directory of your project and the appropriate image is selected according to it.

To use a different version of node other than the default, create a .node-version file and add the version to it. Example,

22.10

Ensure you use a version supported by docker node image.

Package manager

Currently, Viduli build system supports npm, yarn and pnpm package managers. corepack is enabled. Package managers are detected according to the following algorithm in the following order of precedence.

  1. If a yarn.lock file is detected - yarn is used.
  2. If a package-lock.json file is detected - npm is used.
  3. If a pnpm-lock.json file is detected - pnpm is used.

Note: Every node application is expected to have a package.json file at the root directory.

Express.js

Express.js builds on Viduli use a single build and run image.

  • Base distribution: Debian 12 Bookworm Slim
  • Default node version: 24.12.0
  • Default image: node:24.12.0-bookworm-slim
  • Included packages: ca-certificates procps git curl wget nano
  • Default port: 4000

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, if a build script exists in package.json, it will be invoked. You can customize it by setting the build command value in the resource build configuration.

Run command

The default is npm run start. It can be overridden by providing the run command in the resource build configuration.

Environment

NODE_ENV is set to production.

By default, there are two environment variables set - PORT and HOSTNAME. HOSTNAME is always set to 0.0.0.0. PORT is set to 4000 by default. If you set an expose port value in the resource build configuration, PORT is set to that value.

Secrets added to the resource are also available in the environment during the image build and run stages.

NestJS

NestJS builds on Viduli use a single build and run image.

  • Base distribution: Debian 12 Bookworm Slim
  • Default node version: 24.12.0
  • Default image: node:24.12.0-bookworm-slim
  • Included packages: ca-certificates procps git curl wget nano
  • Default port: 3000

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Run command

The default is npm run start:prod. It can be overridden by providing the run command in the resource build configuration.

Environment

  • NODE_ENV is set to production.
  • HOSTNAME is always set to 0.0.0.0.
  • PORT is set to 3000 by default. If you set an expose port value in the resource build configuration, PORT is set to that value.

Secrets added to the resource are also available in the environment during the image build and run stages.

To overwrite any of these environment variables, just add them to resource secrets.

Next.js

Next.js builds on Viduli use separate build and run images. Both stages start from the same base image.

  • Base distribution: Debian 12 Bookworm Slim
  • Default node version: 24.12.0
  • Default image: node-24.12.0-bookworm-slim
  • Included packages: ca-certificates procps git curl wget nano

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Output directory

By default, the build output is assumed to be in the .next folder. If you use a custom build output directory, you can set it in the resource build configuration.

Runtime dependencies

Depending on the detected package manager, runtime production dependencies are installed using the following commands,

  • yarn: yarn install --production --frozen-lockfile
  • npm: npm ci --production
  • pnpm: pnpm install --prod --frozen-lockfile

Run command

Run command is invoked to start the container once it's deployed. It should start the main process to listen and serve requests.

The default is npm run start. It can be overridden by providing the run command in the resource build configuration.

Environment

NODE_ENV is set to production in both build and run stages.

Two environment variables set in the runner stage - PORT and HOSTNAME. HOSTNAME is always set to 0.0.0.0. PORT is set to 3000 by default. If you set an expose port value in the resource build configuration, PORT is set to that value.

Secrets added to the resource are also available in the environment during the image build and run stages.

To overwrite any of these environment variables, just add them to resource secrets.

Limitations

  • Support for next.js standalone builds is planned but not implemented yet.

Create React App

Create React App builds on Viduli use separate build and run images.

  • Base distribution:
    • Build: Debian 12 Bookworm Slim
    • Runtime: Nginx
  • Default node version: 24.12.0
  • Default image:
    • Build: node:24.12.0-bookworm-slim
    • Runtime: nginx:1.29.4-trixie
  • Included build packages: ca-certificates procps git curl wget nano

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Output directory

The default output directory is build. You can customize it by setting the output directory value in the resource build configuration.

Runtime

The built static assets are served using nginx. The nginx configuration is automatically generated to serve the static files from the build output directory.

Nuxt.js

Nuxt.js builds on Viduli use a single build and run image.

  • Base distribution: Debian 12 Bookworm Slim
  • Default node version: 24.12.0
  • Default image: node:24.12.0-bookworm-slim
  • Included packages: ca-certificates procps git curl wget nano
  • Default port: 3000

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Run command

The default is node .output/server/index.mjs. It can be overridden by providing the run command in the resource build configuration.

Environment

NODE_ENV is set to production.

By default, there are two environment variables set - PORT and HOST. HOST is always set to 0.0.0.0. PORT is set to 3000 by default. If you set an expose port value in the resource build configuration, PORT is set to that value.

Secrets added to the resource are also available in the environment during the image build and run stages.

Any of these variables can be overridden by setting your own resource secrets.

Angular

Angular builds on Viduli use separate build and run images.

  • Base distribution:
    • Build: Debian 12 Bookworm Slim
    • Runtime: Nginx 1.29.4 Trixie
  • Default node version: 24.12.0
  • Default image:
    • Build: node:24.12.0-bookworm-slim
    • Runtime: nginx:1.29.4-trixie
  • Included packages:
    • Build: ca-certificates procps git curl wget nano

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Output directory

The default output directory is dist. The build system automatically detects the browser output directory within the dist folder and serves it using nginx.

Runtime

The built static assets are served using nginx. The nginx configuration is automatically generated to serve the static files from the build output directory.

SvelteKit

SvelteKit deployments on Viduli should use the official node adapter.

  • Base distribution: Debian 12 Bookworm Slim
  • Default node version: 24.12.0
  • Default image: node:24.12.0-bookworm-slim
  • Included packages: ca-certificates procps git curl wget nano
  • Default port: 3000

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Run command

The default is node build. It can be overridden by providing the run command in the resource build configuration.

Environment

NODE_ENV is set to production.

By default, there are two environment variables set - PORT and HOST. HOST is always set to 0.0.0.0. PORT is set to 3000 by default. If you set an expose port value in the resource build configuration, PORT is set to that value.

Secrets added to the resource are also available in the environment during the image build and run stages.

Gatsby

Gatsby deployments on Viduli use a single-stage build and run image.

  • Base distribution: Debian 12 Bookworm Slim
  • Default node version: 24.12.0
  • Default image: node:24.12.0-bookworm-slim
  • Included packages: ca-certificates procps git curl wget nano
  • Default port: 9000

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Environment

  • NODE_ENV is set to production.
  • GATSBY_TELEMETRY_DISABLED is set to 1.
  • PREFIX_PATHS is set to true during the build process.

Run command

The default is npx gatsby serve --prefix-paths --port <expose_port> --host 0.0.0.0. It can be overridden by providing the run command in the resource build configuration.

Astro

Astro builds on Viduli use a single build and run image.

  • Base distribution: Debian 12 Bookworm Slim
  • Default node version: 24.12.0
  • Default image: node:24.12.0-bookworm-slim
  • Included packages: ca-certificates procps git curl wget nano
  • Default port: 4321

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Run command

The default is node ./dist/server/entry.mjs. It can be overridden by providing the run command in the resource build configuration.

Environment

NODE_ENV is set to production.

By default, there are two environment variables set - PORT and HOST. HOST is always set to 0.0.0.0. PORT is set to 4321 by default. If you set an expose port value in the resource build configuration, PORT is set to that value.

Secrets added to the resource are also available in the environment during the image build and run stages.

Ember.js

Ember.js builds on Viduli use separate build and run images.

  • Base distribution:
    • Build: Debian 12 Bookworm Slim
    • Runtime: Nginx Trixie
  • Default node version: 24.12.0
  • Default image:
    • Build: node:24.12.0-bookworm-slim
    • Runtime: nginx:1.29.4-trixie
  • Included packages: ca-certificates procps git curl wget nano

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Output directory

The default output directory is dist. You can customize it by setting the output directory value in the resource build configuration.

Runtime

The built static assets are served using nginx. The nginx configuration is automatically generated to serve the static files from the build output directory.

Docusaurus

Docusaurus builds on Viduli use separate build and run images.

  • Base distribution: Debian 12 Bookworm Slim
  • Default node version: 24.12.0
  • Default image: node:24.12.0-bookworm-slim
  • Included packages: ca-certificates procps git curl wget nano
  • Default port: 3000

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Runtime dependencies

After building, production dependencies are installed using the following commands,

  • yarn: yarn install --production --frozen-lockfile
  • npm: npm ci --production
  • pnpm: pnpm install --prod --frozen-lockfile

Run command

The default is npm run serve -- --port <expose_port> --host 0.0.0.0. It can be overridden by providing the run command in the resource build configuration.

Environment

NODE_ENV is set to production.

Secrets added to the resource are also available in the environment during the image build and run stages.

Vite

Vite builds on Viduli use separate build and run images.

  • Base distribution:
    • Build: Debian 12 Bookworm Slim
    • Runtime: Nginx 1.29.4 Trixie
  • Default node version: 24.12.0
  • Default image:
    • Build: node:24.12.0-bookworm-slim
    • Runtime: nginx:1.29.4-trixie
  • Included packages:
    • Build: ca-certificates procps git curl wget nano

Build dependencies

Depending on the detected package manager, build-time dependencies are installed using the following commands,

  • yarn: yarn --frozen-lockfile
  • npm: npm ci
  • pnpm: pnpm i --frozen-lockfile

Build command

By default, the build command declared in package.json is invoked to build the project. You can customize it by setting the build command value in the resource build configuration.

Output directory

The default output directory is dist. You can customize it by setting the output directory value in the resource build configuration.

Runtime

The built static assets are served using nginx. The nginx configuration is automatically generated to serve the static files from the build output directory.