Files
computer-playbook/docs/contributing/environment/setup.md
T
kevinveenbirkenbachandClaude Opus 4.7 f20278b4d5 refactor(env): drop env.development marker and its compose layering
The env.development marker file existed for two purposes that no longer
justify the wiring cost: a per-machine compose --env-file override layer
appended after auto-loaded .env, and a fallback signal for
detect_runtime() to return "dev" when the marker exists. With every
INFINITO_* default now collapsed into env/default.env -> .env,
persistent per-machine overrides are best expressed as
\`export INFINITO_FOO=…\` before invoking make (load.sh honors
caller-set values via setdefault). The marker fallback in
detect_runtime was redundant with the explicit RUNTIME=dev that every
dev-flow callsite already passes (fresh-*.sh, reset/inventory.sh).

Removed:
- Makefile mark-development target + .PHONY entry
- env.development from .gitignore / .dockerignore
- env_local conditional in compose.up()
- env_development conditional in down._compose_run()
- env.development conditional in scripts/meta/resolve/apps.sh and
  scripts/meta/resolve/diff/affected_roles.sh
- env.development marker branch + the now-unused project_root parameter
  from cli/meta/runtime/detect_runtime; __main__.py caller follows
- "Optional Development Marker" section in docs/contributing/environment/
  setup.md and the marker reference in docs/administration/installation.md

Also drops two RUNTIME=='dev' guards in roles/web-app-bigbluebutton that
relied on the auto-detect path:
- the compose build etherpad task in tasks/02_compose.yml
- the freeswitch iptables-REJECT entrypoint override in
  templates/compose.override.yml.j2

With auto-detection of "dev" gone the guards would otherwise only fire
on explicit RUNTIME=dev runs, silently regressing the local-dev path
operators rely on; both behaviors now apply unconditionally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 16:22:33 +02:00

3.6 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.

The pre-commit hooks are installed automatically by make environment-bootstrap. Per-machine overrides go into the process environment before invoking make (e.g. export INFINITO_FOO=…); make dotenv honors caller-set values via setdefault semantics.

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.