Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.61 KB

images-using-images-s2i-nodejs-configuration.adoc

File metadata and controls

35 lines (24 loc) · 1.61 KB

Configuring source-to-image for Node.js

The Node.js image supports a number of environment variables, which can be set to control the configuration and behavior of the Node.js runtime.

To set these environment variables as part of your image, you can place them into a .s2i/environment file inside your source code repository, or define them in the environment section of the build configuration’s sourceStrategy definition.

You can also set environment variables to be used with an existing image when creating new applications, or by updating environment variables for existing objects such as deployment configurations.

Note

Environment variables that control build behavior must be set as part of the source-to-image (S2I) build configuration or in the .s2i/environment file to make them available to the build steps.

Table 1. Development Mode Environment Variables
Variable name Description

DEV_MODE

When set to true, enables hot deploy and opens the debug port. Additionally, indicates to tooling that the image is in development mode. Default is false.

DEBUG_PORT

The debug port. Only valid if DEV_MODE is set to true. Default is 5858.

NPM_MIRROR

The custom NPM registry mirror URL. All NPM packages are downloaded from the mirror link during the build process.