title: Docker-compose env file not working
body: <p>I'm writing as <code>docker-compose</code> file to up MySQL instance and want to use few variable from env file: here are the files actually look like:</p>
  
  <p>docker-compose.yml</p>
  
  <pre><code>version: '3.3'
  services:
    db:
      image: mysql
      restart: always
      env_file:
        - ./imran.env
      environment:
        MYSQL_ROOT_PASSWORD: ${PASS}
      ports:
        - ${PORT1}: ${PORT2}
  </code></pre>
  
  <p>imran.env</p>
  
  <pre><code>PASS=imran123
  PORT1=3306
  PORT2=3306
  </code></pre>
  
  <p>Instead of working correct i'm getting following errors:</p>
  
  <pre><code>WARNING: The PASS variable is not set. Defaulting to a blank string.
  WARNING: The PORT2 variable is not set. Defaulting to a blank string.
  ERROR: The Compose file './docker-compose.yml' is invalid because:
  services.db.ports contains unsupported option: '${PORT1}
  </code></pre>
  
  <p>Please Help</p>