Skip to content

Components

Components are the units Orch applies, records, inspects, and destroys.

components:
web:
type: docker-compose
runner: local
depends_on:
- setup
workdir: ./work/web
source:
files:
compose.yml: ./docker-compose.yml
config:
command: docker compose
env:
BASE_URL: "http://localhost"
hooks:
post_apply:
- command: curl -fsS "http://localhost:${web.outputs._meta.ports.services.web.80}"
FieldRequiredDescription
typeYesAdapter name, such as script, docker-compose, terraform, or cloudformation.
runnerYesRunner name from the runners map.
depends_onNoComponents that must apply before this component. Destroy runs in reverse state order.
workdirNoComponent work directory on the runner. Orch builds a default when omitted.
sourceAdapter-specificComponent source. Each adapter decides which source modes it supports.
withNoSupporting files copied into the component workdir but not treated as executable/source entrypoints.
configAdapter-specificAdapter configuration.
envNoEnvironment variables passed to adapter commands and scripts. Values are interpolatable. See Env.
outputsNoUser-declared outputs expected from the adapter.
hooksNoLifecycle hooks run around apply and destroy. Requires a runner with Exec.

Adapter-specific config, source, and output behavior is documented on each adapter page.