Zend certified PHP/Magento developer

what environment variables can override application mode and where do they need to be set?

When I run deploy:mode:show, it shows an application mode followed by a message that says that its value may be overridden. For example:

prod@mysite01:~/www$ ./bin/magento deploy:mode:show
Current application mode: production. (Note: Environment variables may override this value.)

Same thing if I set MAGE_MODE by hand in the command line:

prod@mysite01:~/www$ MAGE_MODE=developer ./bin/magento deploy:mode:show
Current application mode: production. (Note: Environment variables may override this value.)

So, what does that note mean? Can this command ever return production when the site is really in developer mode, or vice versa?

The reason I’m asking is that we’ve had cause to question whether our monitoring scripts are working correctly. We would like to rule this out as a source of confusion.

I’d expect MAGE_MODE to be respected. It doesn’t appear to be.