Where Does This Value Come From?
compose.yaml has environment: { LOG_LEVEL: ${LOG_LEVEL:-info} }. The .env file next to it says LOG_LEVEL=debug, and your shell has LOG_LEVEL=warn exported. What does the container get?
compose.yaml
environment: { LOG_LEVEL: ${LOG_LEVEL:-info} }
.env
LOG_LEVEL=debug
LOG_LEVEL=warn
Choose one answer
warn: the shell beats .env for interpolation.
warn
debug, because the .env file next to compose.yaml overrides the shell.
debug
info, because the default in the file always wins.
info
An error, because the value is defined twice.