Skip to content

Env

env is a string map passed to a component’s adapter operations.

components:
smoke:
type: script
runner: local
env:
BASE_URL: "http://localhost:${web.outputs._meta.ports.services.web.80}"

Values are interpolated before execution. Ork warns when environment keys look like credential or access-mechanism values, but it still passes them through.

Ork adds a small set of runtime variables to every component execution environment.

ORK_WORKDIR is always available when an adapter command or lifecycle hook runs. It points at the component workdir on the runner for adapter operations, and at the selected hook workdir during hooks.

VariableAvailable inDescription
ORK_ENV_IDAdapter operations, hooksCurrent Ork environment ID.
ORK_COMPONENT_NAMEAdapter operations, hooksCurrent component name.
ORK_COMPONENT_TYPEAdapter operations, hooksCurrent component adapter type.
ORK_RUNNER_NAMEAdapter operations, hooksRunner executing the component.
ORK_WORKDIRAdapter operations, hooksComponent workdir on the runner.

Lifecycle hooks also receive:

VariableAvailable inDescription
ORK_LIFECYCLEHooksHook phase, such as pre_apply or post_destroy.

Adapters may add their own environment variables.

AdapterVariables
ScriptORK_OUTPUT_ENV, ORK_OUTPUT_JSON
Docker ComposeCOMPOSE_PROJECT_NAME

See each adapter page for adapter-specific behavior.