title: Can Docker use env variables in Volumes definitions?
body: <p>I have a <code>webapp</code> service defined in a docker compose file.  Trying to add some flexibility for user to customize the volume mounts.  I tried many variations, all unsuccessfully, the one with the most promise is:</p>
  
  <pre><code>    volumes: ['log-volume:/path/to/container/logs', 
                'data-volume:/path/to/container/data' ${WEBAPP_VOLUMES:-''}]
  </code></pre>
  
  <p>I think this <strong>should</strong> default the environment variable to an empty string and all should be good (i.e. WEBAPP_VOLUMES is not defined in the .env file).  Then to use, one would need start any definition with a comma, not ideal, but seems acceptable.  However, <code>docker-compose</code> hates this!  </p>
  
  <p>I get errors such as:</p>
  
  <pre><code>ERROR: yaml.scanner.ScannerError: while scanning a plain scalar
    in "./docker-compose.yml", line 20, column 110
  found unexpected ':'
    in "./docker-compose.yml", line 20, column 124
  Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.
  </code></pre>
  
  <p>Does anyone know to accomplish what I am trying to do here?</p>