Environment Values
This example loads a small YAML document into memory and uses it in a service environment variable.
yaml
log_level: info
loads:
- name: app_values
statics:
- content:
name: app_values
content: |
test:
message: hello world
print: 'config file: {{ env "CONFIG_FILE" }}'
services:
- name: show-env
path: .
command: env
inherit_env: true
env:
TEST: "1"
TEST_MESSAGE: "{{ .app_values.test.message }}"
HOSTTYPE: '{{ env "HOSTTYPE" }}'
filters:
- SECRETinherit_env copies the current process environment first, then env overrides or adds values.
Even with inherit_env: false (the default), a minimal baseline such as PATH, HOME, TMPDIR, USER, LANG is always inherited from the parent process so commands keep working; set them explicitly in env to override.