Build from Git source

Node.js

A Node.js runtime for web applications, APIs and workers. The platform builds your repository with npm into a container image and runs it as a Kubernetes Deployment.

  • Source-to-Image build
  • npm install + npm start
  • Selectable Node.js version
  • Rebuild on Git push

No credit card required · Free during the Alpha phase · View pricing

Node.js · Source-to-Image buildPLATFORM STACKYour applicationSource · package.json · lockfile in GitYOU OPERATEBuildBuildConfig · nodejs builder image · npm installYOU OPERATERuntimeDeployment · Service · Route · npm startYOU OPERATEKubernetes platformOKD/OpenShift · image registry · routerGRN-MANAGEDHosts & networkNetherlands · 100% renewableGRN-MANAGED GRN.CLOUD

Overview

Run Node.js code from your repository as a container workload.

Web apps & APIs

Express, Fastify, NestJS, Next.js server output — any HTTP service started from package.json.

Workers

Queue consumers and background processes run as their own Deployment, built from the same repository with a different start script.

Pinned versions

Choose the Node.js major version from the nodejs image stream tags. Your lockfile pins dependencies; the image tag pins the runtime.

Deployment

Source-to-Image (S2I): the nodejs builder image installs dependencies and packages the app.

Git repository

Source plus package.json and lockfile

S2I build

npm install on the nodejs builder image

ImageStream

Built image, tagged and stored in the cluster

Deployment + Route

npm start on port 8080 behind a Service and Route

  • Web console — Add → Import from Git. The console detects package.json and proposes the nodejs builder; pick the version tag and a name.
  • CLI — oc new-app nodejs:~ creates the BuildConfig, image stream, Deployment and Service.
  • Start command — the image runs npm start; set NPM_RUN to run a different package.json script. The app must listen on port 8080.
  • Configuration — pass settings as environment variables, ConfigMaps and Secrets rather than committing them to the repository.
  • State — containers are replaceable. Keep state in a database such as PostgreSQL or MySQL, or mount a persistent volume.
bash — oc
# list the Node.js versions available as builders
$ oc get imagestream nodejs -n openshift

# build and deploy from Git
$ oc new-app nodejs~https://github.com/sclorg/nodejs-ex.git \
    --name=my-app

# configure, expose over HTTPS
$ oc set env deployment/my-app LOG_LEVEL=info
$ oc create route edge my-app --service=my-app

Platform integration

Standard Kubernetes objects in your own project.

  • Your namespace — builds and pods run in your project, under its quotas, resource limits and role bindings.
  • Restricted security context — the image runs as an arbitrary non-root user, so it is admitted under OpenShift's default restricted security constraints.
  • Scaling and rollout — set replicas or a HorizontalPodAutoscaler on the Deployment; a new image triggers a rolling update.
  • Services — reach databases and other workloads in the namespace over cluster DNS (..svc).
  • CI/CD — run tests and builds before deploy with Tekton Pipelines or GitLab CI.

Deploy a Node.js app from your repository.

Import from Git in the console, or run one oc new-app command.

Hosted in the Netherlands · EU data residency · 100% renewable energy