env_file directive not working

I don't believe .env files generally like to be named. If you want differnt versions you can do stuff like

.env.production .env.dev

Applications that auto load env files will ignore named files like global.env (which is useful if you do something like old.env). Unless explicitly pointed to that file.

If you are going to name it, you will likely need to give it the path of the file.

env_file: ./global.env

You could also change it back to ".env" and make it unhidden. If you are on windows, to view hidden files and folders:

View hidden files and folders in Windows Open File Explorer from the taskbar. Select View > Options > Change folder and search options. Select the View tab and, in Advanced settings, select Show hidden files, folders, and drives and OK.

This will make it easier to edit, and still allow it to run with less headaches.

/r/docker Thread