Use system environment variables in env_files in docker-compose.yml

I have an env file called myenvfile.env which is wanted to be defined from a system environment variable.

.env

SYSTEM_ENV_VAR=prefix

myenvfile.env

MY_COMPOSED_ENV_VAR=${SYSTEM_ENV_VAR}_suffix

docker-compose.yml

version: '3.4'

services:
  myservice:
    env_file: 
      - env_files/myenvfile.env

But when I create container with docker-compose up -d, I look into the container environment variables, and MY_COMPOSED_ENV_VAR = "${SYSTEM_ENV_VAR}_suffix" instead of desired "prefix_suffix".

How can I achieve that? Thanks

Source: Docker Questions