You can manually source the .env file and then have the variables available for docker-compose.
Example:
set -o allexport;
source .env;
docker-compose up -d;
set +o allexport;
set -o is a bash flag to allow exported variables to be available to the following commands. set +o resets the flag.
I personally prefer this option rather than duplicating strings in .env files
Please note also that the .env file should reflect bash syntax, therefore, your .env should become: