docs: list the env vars missing from the configuration reference
Merged
SC
6h ago+36+36+01234567890123456789-0-0-0123456789
Summary
The configuration reference did not list 17 environment variables that the loader binds on main. Two of the keys behind them, worker.shutdown_timeout and coordinator.worker_wait_timeout, were not documented at all.
How the list was made:
grep -o 'env: *"[A-Z0-9_]*"' internal/cmn/config/loader.go \
| sed 's/.*"\(.*\)"/DAGU_\1/' | sort -u > code_env.txt
grep -o 'DAGU_[A-Z0-9_]*' server-admin/reference.md | sort -u > doc_env.txt
comm -23 code_env.txt doc_env.txt
After this PR the comm output is empty.
Changes
worker.shutdown_timeout/DAGU_WORKER_SHUTDOWN_TIMEOUT(dagucloud/dagu#3062): YAML example, env var with the supervisor stop timeout advice from the schema, and the defaults list (60s,0waits without a bound).coordinator.worker_wait_timeout/DAGU_COORDINATOR_WORKER_WAIT_TIMEOUT(dagucloud/dagu#3198): YAML example, env var, and the defaults list (2m,0refuses the dispatch at once). This one is on main but not in a release yet, so it is a separate commit in case you prefer to hold it until the next release.DAGU_CORS_ALLOWED_ORIGINS,DAGU_BROWSER_GUARD_CLIENT_CERTIFICATES,DAGU_OPENCODE_EXECUTABLEandDAGU_OPENCODE_ENV_PASSTHROUGH, with links to the pages that already describe them.- Cloud secret provider defaults:
DAGU_SECRETS_AWS_REGION,DAGU_SECRETS_GCP_PROJECT_ID,DAGU_SECRETS_GCP_LOCATION,DAGU_SECRETS_AZURE_VAULT_URLandDAGU_SECRETS_ALIBABA_{REGION,ENDPOINT,CA_FILE}, plus the matchingsecrets.*keys in the YAML example. The provider pages already document them. DAGU_NAVBAR_COLOR,DAGU_NAVBAR_TITLE,DAGU_LOG_ENCODING_CHARSETandDAGU_MAX_DASHBOARD_PAGE_LIMITare bound as "UI (legacy)" aliases of theDAGU_UI_*variables. They are now in the legacy list, with a note thatDAGU_UI_*wins when both are set.
Checks
node scripts/validate-examples.mjswith Dagu built from main (0689a90): 912 examples validatedpnpm buildpnpm test:workergit diff --check- With Dagu main:
DAGU_NAVBAR_TITLEalone sets the title; withDAGU_UI_NAVBAR_TITLEalso set, theDAGU_UI_*value is used.
Summary by cubic
Adds the 17 environment variables missing from the configuration reference, now covering every variable the loader binds on main. Two keys, worker.shutdown_timeout and coordinator.worker_wait_timeout, were not documented at all and now include YAML examples, env var entries, and default behavior.
Changes:
- Adds CORS, browser guard, OpenCode, and cloud secret provider env vars with links to their existing pages.
- Lists
DAGU_NAVBAR_COLOR,DAGU_NAVBAR_TITLE,DAGU_LOG_ENCODING_CHARSET, andDAGU_MAX_DASHBOARD_PAGE_LIMITas legacy UI aliases, with theDAGU_UI_*value winning when both are set. - Keeps the
coordinator.worker_wait_timeoutcommit separate since it is not in a release yet, in case you prefer to hold it until the next release.