Skip to main content

Environment Variables

Environment variables are closely related to the technology of Docker. They are usually written in the .env or .txt file right in the project directory. The main reason for using environment variables is to improve the flexibility of your application when using Docker. You can for example use a PORT environment variable to specify on which port to run a backend application (e.g., PORT=80).

Prerequisites

Environment variables are associated with application components. To update or create environment variables, you thus need the associated component to exist, or be in the process of creating it.

Steps

The following animation details how to create or update environment variables for an already existing application component:

How to add an environment variable for an existing component

You also have the possibility to create environment variables when you create a new component:

How to add an environment variable for a new component