Environment Variables

Environment variables are used to store the values of the frequently used parameters that are provided to a software program at runtime. The utilization of such placeholders makes your application more portable and flexible.

The most common use of variables is to make quick adjustments to specific values that are utilized multiple times in your application code. Follow the linked guide if you need to create such custom environment variables for your project.

Another use case for variables is to configure the application through the set of predefined values (enable/disable features, change behavior, etc.). The platform supplements most of the certified software stacks with a number of default variables, which can be used by developers to help with application hosting.

Default Environment Variables

Click this abstract to view a full list of default variables used within the platform containers.

Or use the categorized groups below to narrow the search.

Note: Variables marked with “+” in the Editable column can be freely adjusted to customize your container. Herewith, a restart is required to apply changes.

It is not recommended to adjust variables marked with “-” as such an action won’t apply any actual changes to the container; however, it may break some internal logic.

There are a number of options that can be used with all of the platform-managed stacks:

Variable NameEditable*Description
{SOFTWARE}_VERSION-A version of the specified software (stack, engine, template, module, etc.).
CLONE_ON_SCALE+Defines if new nodes upon horizontal scaling should be clones of a layer’s master (true) or created from scratch (false).
DOCKER_EXPOSED_PORT-Lists ports from the EXPOSE directive of the image’s dockerfile, which were opened via container firewall during the environment creation.
JELASTIC_EXPOSE+Manages the auto-redirect functionality state with an ability to define the required port manually.
MASTER_HOST-A short hostname for a master node within a layer.
MASTER_ID-A unique node identifier of a master node within a layer.
MASTER_IP-An internal IP address of a master node within a layer.
ON_ENV_INSTALL+ (before env creation)A script (or link to it) to be executed after environment creation.
OPEN_INBOUND_PORTS (JELASTIC_PORTS)+ (before env creation)Specifies custom ports, which should be opened in the firewall during container creation.
PATH-A default shell variable, with a list of paths to directories with executable programs.
STACK_NAME-The name of the current stack.
STACK_PATH-The home directory of the stack.
STACK_USER-The name of the stack’s default user.

Java

Click here to list Java variables.

PHP

Click here to list PHP variables.

Ruby

Click here to list Ruby variables.

Node.js

Click here to list Node.js variables.

Go (Golang)

Click here to list Go (Golang) variables.

.NET Core

Click here to list .NET Core variables.

Load Balancers

Click here to list Load Balancers variables.

Databases

Click here to list Databases variables.

Other Stacks

Click here to list Other Stacks variables.

What’s next?