Uploading of env variables from host machine to dockercompose

Heelo Everyone
I am facing one issue while trying to upload env defined over host machine using export auth=variable & in docker compose file it is defined as givent below:

    image: imagename
    working_dir: /data/src/GCE
    # env_file: .env
      - variabledocker=${auth}
    - "../.:/data"

but i am getting below error:
auth variable is not set defaulting to blank string
I also check on host machine using command env | grep auth it is showing the variable what could be the issue

What is the version of Docker Compose? If auth exists on the host it should work in the compose file.
Are you using Docker locally or with a remote connection?
And finally, can you share the commands that we can just run by copy-pasting them to reproduce the issue?