title: docker-compose v3: sharing bind-mounted volume between multiple containers with top-level volumes syntax
body: <p>With v2 of docker-compose synthax, we were able to do something like this:</p>
  
  <pre><code>version: '2'
  services:
    app:
      image: tianon/true
      volumes:
        - ../app:/var/www/app
    nginx:
      image: nginx
      volumes_from:
        - app
    php:
      image: php
      volumes_from:
        - app
  </code></pre>
  
  <p>In v3.2 <code>volumes_from</code> is now <code>invalid option</code>. The documentation is all for using new top-level volumes synthax, which is <code>all the ways better</code>.
  I've read some comments on github, and the only solution that people propose is</p>
  
  <pre><code>version: '3.2'
  services:
    nginx:
      image: nginx
      volumes:
        - app:/var/www/app
    php:
      image: php
      volumes:
        - app:/var/www/app
  volumes:
    app:
      driver_opts:
        type: none
        device: ../app
        o: bind
  </code></pre>
  
  <p>Which looks worse obviously, and it even doesn't work for me. It gives me an error: <code>no such file or directory</code>. So what else should I try? It seems like I can still use <code>links</code> instead of top-level volumes, but it's considered as legacy option in documentation. So how to do it right with new syntax?</p>
  
  <p><strong>EDIT:</strong>
  Question has been identified as a possible duplicate, but I don't agree. See my comment bellow for explanation.</p>