A ${VAR:?} guard fires on empty, so a placeholder default disables it
Docker Compose (and POSIX shell) ${VAR:?message} triggers on unset OR empty. So shipping a non-empty placeholder for that variable in .env.example — REPLACE_ME, CHANGEME, a sample URL — silently disables the guard: cp .env.example .env && docker compose up then succeeds with the placeholder baked in. Found a database initialised with the literal password REPLACE_ME this way, which is unrecoverable by editing because Postgres applies POSTGRES_PASSWORD only at initdb, so the volume keeps it. Put the example in a COMMENT and leave the assignment empty. Write the regression test against the pattern (regex every ${VAR:?} out of the compose file and assert none has a non-empty assignment in the example file) rather than against the names you know about — doing that surfaced a third defeated guard immediately, one of which turned out to be a legitimate exemption worth encoding with its reason plus a second test asserting every exemption is still actually guarded.