After testing, I found that the Makefile did not behave as intended. I fixed the bug so that the Makefile does optionally read the .env file.
One source of confusion may be that shell variables have higher priority than the .env file for Docker Compose, while the .env variables have higher priority than shell variables for the Makefile. Unfortunately, I could not find a way to fix this issue. Providing Make with variables via the host shell is bad practice anyway, as it breaks hermeticity.
After testing, I found that the Makefile did not behave as intended. I fixed the bug so that the Makefile does optionally read the
.env
file. One source of confusion may be that shell variables have higher priority than the.env
file for Docker Compose, while the.env
variables have higher priority than shell variables for the Makefile. Unfortunately, I could not find a way to fix this issue. Providing Make with variables via the host shell is bad practice anyway, as it breaks hermeticity.