Laravel `.env`, system-level, and server-level environment variables

Viewed 2644

I am a bit confused by the following sentence in Laravel 5 Documentation :

Any variable in your .env file can be overridden by external environment variables such as server-level or system-level environment variables.

It looks like what I want to do, i.e. setting some of my .env variables from server-level environment variables, but I can't find any reference on how to do it.

It seems that there are some security concerns behind such a configuration, but the following stackoverflow answer does not comment this precise sentence.

I also tend to think that if references to environment variables are used in the .env file, it is precisely to remove the confidential information, and as such I don't see anymore the security concerns.

My conclusion is that I misunderstood the sentence, but I'd be very happy to understand why, or, if by chance it happens to be possible, know how to do that. Thanks.

1 Answers
Related