[ColdBox-6.0.0] Read .env file using getSystemSetting()

My site is running on Lucee 5 in Windows/IIS environment. I was wondering how I can read .env file variables using getSystemSetting(). Is there any plugins/extensions that I need to install? Thanks.

If you’re using CommandBox, you simply need the “commandbox-dotenv” module installed and it should just work.

I know that because I use CommandBox on my dev. machine. :slight_smile:
How about if it is in non-CommandBox environment?

If you’re in Docker, then you just set actual env vars in your container. If this is not Docker, then I’d recommend looking into this module:

https://github.com/sjdaniels/coldbox-module-dotenvsettings

It’s not quite the same, but it may help you.