LogoLogo
  • Welcome to Release
  • Getting started
    • Quickstart
    • Create an account
    • Prepare to use Release
    • Create an application
      • Create custom application
      • Create from template
      • Servers vs runnables
    • Create an environment
  • Guides and examples
    • Domains and DNS
      • Manage domains
      • DNS and nameservers
        • Configure GoDaddy
        • Configure Cloudflare
        • Configure Namecheap
        • Other DNS hosts
      • Routing traffic
    • Example applications
      • Full stack voting app
      • Flask and RDS counter app
      • Static site with Gatsby
      • Golang with Postgres and Nginx
      • WordPress with MySQL
      • Spring and PostgreSQL
      • Terraform and Flask
      • OpenTelemetry demo
      • Load balancer with hostname
      • Static JavaScript service
      • SSH bastion access to services
      • ngrok and OAuth for private tunnels
      • Using OAuth Proxy
      • Hybrid Docker and static site
      • App Imports: Connecting two applications
      • Example library
    • Running instances
      • Cron jobs
      • Jobs
      • Using Helm charts
      • Using terminal
      • Viewing logs
      • Troubleshooting
        • ImagePullBackoff error
        • CrashLoopBackoff error
        • Exit codes
        • OOM: out of memory
    • Advanced guides
      • Containers guide
      • Application guide
      • Kubernetes guide
      • Create a cluster
      • Upgrade a cluster
      • Managing node groups
      • Patch node groups
      • Hostnames and rules
      • Serve traffic on multiple ports
      • Configure access to your K8s cluster
      • Designing for multiple environments
      • Microservices architecture
      • Monitoring your clusters
      • Performance tuning
      • Visibility and monitoring
      • Working with data
        • Container-based data
        • Seeding and migration
        • Cloud-provided data
        • Golden images
        • Third party
      • Pausing Instant Datasets
        • Application pausing schedules
        • Pause/resume environments
      • Infrastructure as code
        • Terraform
  • Reference documentation
    • Account settings
      • Account info
      • Managing users
      • Build settings
        • Build arguments
        • Build SSH keys
      • Add integrations
      • View clusters and cloud integrations
      • Add datasets
      • Environment handles
    • Workflows in Release
      • Stages of workflows
      • Serial deployments
      • Parallel deployments
      • Rolling deployments
      • Rainbow deployments
    • Networking
      • Network architecture (AWS)
      • Network architecture (GCP)
      • Ingresses
      • IP addresses
      • Cloud-provided services
      • Third-party services
    • Release environment versioning
    • Application settings
      • Application Template
        • Schema definition
      • Default environment variables
      • GitHub
      • Pull requests
      • GitOps
      • Just-in-time file mounts
      • Primary App Link
      • Create application FAQ
      • App-level build arguments
      • Parameters
      • Workspaces
    • End-to-end testing
    • Environment settings
      • Environment configuration
      • Environment variables
        • Environment variable mappings
        • Secrets vaults
        • Using Secrets with GitOps
        • Kubernetes Secrets as environment variables
        • Managing legacy Release Secrets
    • Environment expiration
    • Environment presets
    • Instant datasets on AWS
    • Instant datasets on GCP
    • Instant dataset tasks
      • Tonic Cloud
      • Tonic On-Premise
    • Cloud resources
    • Static service deployment
    • Helm
      • Getting started
      • Version-controlled Helm charts
      • Open-source charts
      • Building Docker images
      • Ingress and networking
      • Configuration
    • GitOps
    • The .release.yaml file
    • Docker Compose conversion support
    • Reference examples
      • Adding and removing services
      • Managing service resources
      • Adding database containers to the Application Template
      • Stock Off-The-Shelf Examples
    • Release API
      • Account Authentication
      • Environments API
        • Create
        • Get
        • Setup
        • Patch
      • User Authentication
      • Environment Presets API
        • Get Environment Preset List
        • Get Environment Preset
        • Put Environment Preset
  • Background concepts
    • How Release works
  • Frequently asked questions
    • Release FAQ
    • AWS FAQ
    • Docker FAQ
    • JavaScript FAQ
  • Integrations
    • Integrations overview
      • Artifactory integration
      • Cloud integrations (AWS)
        • AWS guides
        • Grant access to AWS resources
        • AWS how to increase EIP quota
        • Control your EKS fleet with systems manager
        • Managing STS access
        • AWS Permissions Boundaries
        • Private ECR Repositories
        • Using an Existing AWS VPC
        • Using an Existing EKS Cluster
      • Docker Hub integration
      • LaunchDarkly integration
      • Private registries
      • Slack integration
      • Cloud integrations (GCP)
        • GCP Permissions Boundary
      • Datadog Agent
      • Doppler Secrets Manager
      • AWS Secrets Management
    • Source control integrations
      • GitHub
        • Pull request comments
        • Pull request labels
        • GitHub deployments
        • GitHub statuses
        • Remove GitHub integration
      • Bitbucket
      • GitLab
    • Monitoring and logging add-ons
      • Datadog
      • New Relic
      • ELK (Elasticsearch, Logstash, and Kibana)
  • Release Delivery
    • Create new customer integration
    • Delivery guide
    • Release to customer account access controls
    • Delivery FAQs
  • Release Instant Datasets
    • Introduction
    • Quickstart
    • Security
      • AWS Instant Dataset security
    • FAQ
    • API
  • CLI
    • Getting started
    • Installation
    • Configuration
    • CLI usage example
    • Remote development environments
    • Command reference
      • release accounts
        • release accounts list
        • release accounts select
      • release ai
        • release ai chat
        • release ai config-delete
        • release ai config-init
        • release ai config-select
        • release ai config-upsert
      • release apps
        • release apps list
        • release apps select
      • release auth
        • release auth login
        • release auth logout
      • release builds
        • release builds create
      • release clusters
        • release clusters exec
        • release clusters kubeconfig
        • release clusters shell
      • release datasets
        • release datasets list
        • release datasets refresh
      • release deploys
        • release deploys create
        • release deploys list
      • release development
        • release development logs
        • release development start
      • release environments
        • release environments config-get
        • release environments config-set
        • release environments create
        • release environments delete
        • release environments get
        • release environments list
        • release environments vars-get
      • release gitops
        • release gitops init
        • release gitops validate
      • release instances
        • release instances exec
        • release instances logs
        • release instances terminal
  • Release.ai
    • Release.ai Introduction
    • Getting Started
    • Release.ai Templates
    • Template Configuration Basics
    • Using GPU Resources
    • Custom Workflows
    • Fine Tuning LlamaX
    • Serving Inference
Powered by GitBook
On this page
  • Which versions of Node.js does Release support?
  • How to Control JavaScript Out of Memory or Performance Issues?
  • How to filter excessive log entries in Yarn?
  • Does Release support private npm libraries during build?
  • Can I use GitHub Packages with Release?
  • What about static service deployments?
  • Does Release support Yarn?

Was this helpful?

  1. Frequently asked questions

JavaScript FAQ

PreviousDocker FAQNextIntegrations overview

Last updated 10 months ago

Was this helpful?

Which versions of Node.js does Release support?

You can use any version of Node.js with Release.

For Docker containers:

For Docker containers, you can pull in a source image and version with a tag like FROM node:16 at the top of your Dockerfile. Internally, we use and recommend you do too. Take a look at this example of .

For static build images:

For static build images, we use , which will use whatever version of Node.js you have in a .nvmrc file. You can specify a global version at the top of your build directory and override it with different versions further down the directory structure if you need to. Read the for more information, or take a look at this .

How to Control JavaScript Out of Memory or Performance Issues?

JavaScript default memory heap settings are usually correct. Setting your pod memory resource limits between 1 GiB and 4 GiB should be fine. But restricting the amount of memory available to JavaScript may result in bottlenecks and slowdowns that are not easy to predict or understand. Generally, JavaScript will only use a single CPU and therefore, allowing the CPU to address more memory can allow the CPU to be free to process more data without waiting for objects to be swapped in and out of working memory. However, just as JavaScript cannot generally use more than a single CPU, it cannot address more memory without further help. Typically, you will need to set an environment variable or to address memory above the 4 GiB-32 GiB range.

As an example, given the following memory limits:

resources:
  memory:
    limits: 9Gi
    requests: 4Gi

The appropriate environment variable settings would look like this:

services:
  frontend:
  - key: NODE_OPTIONS
    value: "--max-old-space-size=8192"

In this example, we set the options to pass to the Node application to use 8 GiB of RAM. Notice this is slightly less than the limits set by the pod resources since the container will use more memory than just the old space size.

To ensure that your application has enough CPU resources, we do not recommend setting the resource limits higher than 1 since JavaScript is usually single-threaded. However, we do not recommend setting the requested resources too low either, since that can cause scheduler and contention issues in your Kubernetes cluster at the node level. We encourage you to use the following CPU resource limits for any production or performance-based JavaScript applications:

resources:
  cpu:
    limits: 1
    requests: 1

How to filter excessive log entries in Yarn?

Yarn will often output multiple hundreds (or even thousands) of log lines for debugging output. This can bog down the build process and slow down scanning the logs for useful information. Add the following to your .yarnrc.yaml file to filter out certain types of Yarn log output lines:

logFilters:
  - code: YN0013
    level: discard

Here, we specify to exclude the debug output YN0013, which shows the package being fetched and installed, usually many in any node_modules directory.

You can add more filters to exclude log output lines that are not important to you.

Does Release support private npm libraries during build?

  1. Add a .nprmrc file to your code repository with contents that look something like //registry.npmjs.org/:_authToken=${NPM_TOKEN}. Do not fill in your token here, but rather use the variable that will be substituted later (this file is safe to check into your code version system).

  2. Add a copy command so the file is copied into your Docker container. The copy command should be placed below the build argument but above the npm install command. The line looks like COPY .npmrc .npmrc.

  3. Push your changes to GitHub or Bitbucket on a branch.

  4. Be sure to generate a token or use an existing token that is READ-ONLY and can be revoked safely without affecting your other pipelines. Anyone who is an owner of your Release account can see and change these build arguments.

Once you've completed these steps, your build should use the npm token you supplied to pull private libraries. If it works, merge your changes to the default or main development branch.

Can I use GitHub Packages with Release?

Your .npmrc file should look similar to:

//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
@myorg:registry=https://npm.pkg.github.com/

What about static service deployments?

Does Release support Yarn?

Yes, but using npm libraries might require some additional work on your part. This guide to from the npm documentation provides all the technical details. In brief:

Add a to your Dockerfile, preferably somewhere near the top (add a comment so you can remember why you put it there). The line looks like ARG NPM_TOKEN.

Add your token to a in the Build Arguments tab of your Configuration settings:

To install , you'll need to follow the same steps as outlined for npm repositories above. Ensure that your token has privileges for ['read:packages']

For , you can use to add your token. Remember to add secret: true.

While will work for static service deployments, these are usually reserved for Docker images.

To use Yarn, follow the instructions for npm above, then add a .yarnrc.yaml file for the private repository. Take a look at for more information.

nvm
adding nvm to an Alpine image
nvm
nvm docs
Stack Overflow answer
build argument
Docker and private modules
build argument
build argument
GitHub Packages
app-level build arguments
this Gist
environment variables
static service deployments