Inject runtime variables | Run | Northflank Application docs

Run /

Inject runtime variables

Available on combined and deployment services.

Runtime variables (ENV) can be set to be passed to the Docker container at runtime. These can be set for individual service, or set as project secrets to be applied to all or specific services in a project.
Editing runtime variables in the Northflank application

Runtime variables can be set as key-value pairs, or as JSON in the following format:

    "KEY_1": "value1",
    "KEY_2": "value2"

An .env file can also be uploaded and edited using the following format:


Environment variable accessors

Your runtime variables can be accessed via the process environment, for example in a Node environment a variable set as ENV_VALUE=Northflank can be accessed within the container by referring to process.env.ENV_VALUE.

Runtime environmentEnvironment variable accessorRequired import
Pythonos.environ.get("ENV_VALUE")import os
Ruby on RailsENV["ENV_VALUE"]none
Rustenv::var("ENV_VALUE")use std::env

© 2023 Northflank Ltd. All rights reserved.