Define environment variables

This section describes how to define environment variables.

Overview

You can pass environment-specific configuration to the container during a deployment. The Score Specification enables a special environment resource type to be used to support such use cases.

Environment configurations are set within the resource section of your Score Specification file. These act as environment variables when you’re deploying a Workload.

Values for those variables can be either hard-coded (not recommended) or sourced from the resources properties through substitutions (recommended) such as ${resources.my-db.host}.

The Score Specification supports declaring environment variables in a configurations files or as a shell value.

For more information, see Environment specific configuration


Environment variables in score-compose

This section describes how to define environment variables for score-compose.

Environment variables in score-helm

This section describes how to define environment variables for score-helm.

Environment variables in score-humanitec

This section describes how to define environment variables for score-humanitec.