When does docker-compose read env_file?

If you are using docker-compose to start an app (doesn´t matter how many services) and use the env_file option you might have gotten a headache sometimes.

The reason is, that docker reads this file on start up of the container into the containers running environment.

That means if you do changes without restarting the docker container, your changes won´t be effective.

Let me know if this helped you.

Best,

Frank

Leave a Reply