Replace 8 bash env modules with a single Python generator
(cli.meta.env) that materialises env/static.env + runtime context
into a gitignored .env. Each variable lives in its own handler
under utils/env/handlers/; defaults carry inline one-line `# ...`
comments.
Rename to the INFINITO_* schema:
- workflow inputs: APPS, SERVICES_DISABLED, CMD, DEBUG, WHITELIST,
BUNDLES, FULL_CYCLE, VARIANT, RUN_FLAGS, LIMIT_HOST, PARALLEL
- inventory: INVENTORY_DIR / INVENTORY_FILE / HOST_VARS_FILE,
PW_FILE -> INVENTORY_PASSWORD_FILE
- venv: VENV_BASE / VENV_FALLBACK / VENV_NAME
- new SPOT defaults: COMPILE_SILENCE, CONTAINER_NO_CA,
WAIT_HEALTH_TIMEOUT_S, PACKAGE_CACHE_FRONTEND_INIT_IMAGE,
promoted IMAGE_TAG from GHA-only to general passthrough
compose.yml hardening:
- inline \${VAR:-default} removed; strict \${VAR:?...} everywhere
- new integration lint blocks regressions
Tooling:
- scripts/install/all.sh owns the stamp-file install logic
(Makefile target delegates)
- scripts/meta/env/load.sh is the single shell entry point;
8 bash modules deleted
- new shell lint: no INFINITO_* defaults outside env/static.env
Tests:
- 93 new unit tests for utils/env/{builder,parser,runtime,writer}
- restructure tests/lint into repository/ (file-content rules) vs
filesystem/{shell,python,env}/ (filesystem-shape rules)
- drift + smoke integration tests against the generator
Docs:
- variables.md is now a pointer; per-variable docs live next to
the key in env/static.env / env/ci.env
- compose.yml.md drops the Default column
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.9 KiB
Environment Variables
The project's environment is owned by a single generator, not scattered across shell modules.
Every variable is documented INLINE next to its definition with a one-line # ... comment above the key.
This page is just a map of where to look.
Where the defaults live
static.envholds the committed defaults for static keys, each preceded by a one-line comment. Edit this file to change a default or to read the per-variable documentation.ci.envcarries the defaults docker compose consumes via--env-file env/ci.env(DNS, subnet, gateway, domain). Same per-key comment convention..env(gitignored) is generated bymake dotenv, which delegates topython -m cli.meta.env. It combinesstatic.envwith runtime-resolved values (selected distro, GHA/Act flags, df/meminfo-derived cache sizes, sha256 secrets, repository owner, ...). Each line in.envis preceded by its own comment, so the file is self-describing. Open it aftermake dotenvto inspect the effective value-set together with its documentation.
Regenerating
make dotenv
Override individual values by exporting them before make dotenv.
Already-set env vars take precedence over static.env defaults.
Pipeline
env/(underutils/) holds the parser, runtime helpers, writer, and one handler module per dynamically-computed variable underhandlers/.env/(undercli/meta/) provides the CLI entry point invoked aspython -m cli.meta.env.load.shis the shell loader; it sources.envand auto-generates it on a cold clone.
Variables NOT in static.env
A handful of variables are documented next to their consumer because they cannot have a static default:
- Driver-injected by
make upand the dev CLI (cache override paths likeINFINITO_REGISTRY_CACHE_PROXY_CONF, the package-cache config paths, the frontend CA file). See common.py and compose.yml.md. - Computed at container start for
INFINITO_PATH, set by entry.sh. - Persisted on the deploy target for
INFINITO_VERSION, written by the sys-version role. - Compose literals with no env-side knob, namely
GIT_SSL_NO_VERIFYandPYTHONHTTPSVERIFY, documented in compose.yml.md.
Role-scoped variables
App-specific container variables live next to the role that owns them, typically in roles/<role>/templates/env.j2, roles/<role>/templates/bootstrap.env.j2, or roles/<role>/templates/playwright.env.j2.
They are intentionally NOT centralised here so the app documentation and its generated env file stay in sync.