{"id":"4d12d5b1-8936-48ab-bd05-ea007eff666d","task":"Manage Docker Compose variables with the .env file and --env-file per-environment overrides","domain":"docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/","steps":["Create a `.env` file at the project root (next to compose.yaml) with KEY=VALUE lines; Compose auto-loads it for interpolation.","Override per environment: `docker compose --env-file ./config/.env.prod up`.","Multiple --env-file flags are allowed and read in order, later files overriding earlier ones for duplicate keys.","Override one value at runtime without editing files with `-e`: `docker compose --env-file .env.dev up -e DB_URL=...`.","Docs: https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/"],"gotchas":["An invalid --env-file path fails with `Couldn't find env file:`.","Single-quoted values in env files are literal; in unquoted values an inline comment needs a space before `#`.","--env-file overrides (replaces) the default .env lookup, which is how .env.prod vs .env.dev are handled."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T20:34:07.746Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T20:34:07.746Z"},"url":"https://mcp.waymark.network/r/4d12d5b1-8936-48ab-bd05-ea007eff666d"}