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>
4.2 KiB
Development Environment Setup 🛠️
Use the repository's real setup flow. The main source of truth is the Makefile.
Important:
- Some local development commands change host settings such as DNS, AppArmor, and IPv6.
- Some commands use
sudo. - Read the setup guides first if you are new to this environment.
- The local development workflow is mainly tested on Linux.
Platform-Specific Instructions 🖥️
Shared Repository Workflow 🔄
These steps are the shared repository workflow and apply regardless of whether you work on Linux, macOS, or Windows with WSL2.
Bootstrap 🚀
Run these commands from the repository root:
make bootstrap
make environment-bootstrap
make up
make trust-ca
Bootstrap Commands 📋
| Phase | Command | What it does |
|---|---|---|
| Initial setup | make bootstrap |
Installs project dependencies and runs the first repository setup. |
| Host preparation | make environment-bootstrap |
Prepares the local development machine for the project workflow. |
| Start stack | make up |
Starts the local development stack. |
| Browser trust | make trust-ca |
Trusts the generated local CA so *.infinito.example works correctly in your browser. |
Optional Development Marker 🏷️
If you want to mark this checkout as a development environment, run:
make mark-development
This step is optional. It creates an empty env.development file in the repository root.
Several tools (e.g. cli/administration/deploy/development/compose.py, scripts/meta/resolve/apps.sh) pass env/ci.env as the base env-file to Docker Compose and then, when env.development exists, append it as a second --env-file. Because Docker Compose applies env-files in order, any variable defined in env.development overrides the corresponding value from env/ci.env. This lets you customize local settings (ports, image tags, flags) without modifying the shared env/ci.env file.
The pre-commit hooks are installed automatically by make environment-bootstrap and do not depend on this marker.
Teardown 🧹
When you are done, use these commands to stop the stack and clean up the local environment:
make down
make environment-teardown
Teardown Commands 📋
| Phase | Command | What it does |
|---|---|---|
| Stop stack | make down |
Stops the local development stack. |
| Host cleanup | make environment-teardown |
Reverts local development environment changes where supported. |
Full Development Flow 🔁
The repository already contains a modular environment test suite at scripts/tests/environment/. The commands from that suite are explained here as the intended end-to-end flow.
Flow Summary 📋
| Step | Command | Purpose in this flow |
|---|---|---|
| 1 | make install |
Installs the dependencies needed before running the local development flow. |
| 2 | make environment-bootstrap |
Prepares the host machine for local development. |
| 3 | make up |
Starts the development stack. |
| 4 | make test |
Runs the main combined validation flow. |
| 5 | make deploy-fresh-purged-apps INFINITO_APPS=web-app-matomo |
Runs the baseline validation path for one concrete app. For the retry-loop policy, see Role Loop. |
| 6 | make trust-ca |
Makes the generated local certificates trusted by the host browser. |
| 7 | make down |
Stops the running development stack. |
| 8 | make environment-teardown |
Cleans up host-side development environment changes. |
Use this as a practical reference when you want to understand how local development is expected to work.
Minimal Hardware Resources 💾
If you work on a machine with limited CPU, RAM, or disk space, use the guide at hardware.md. The public article with the same topic is here.
For local deploy shortcuts and end-to-end checks, see testing.md.