title: Why doesn't my docker-compose volume get updated with local file additions?
body: <p>Here's my <code>docker-compose.yml</code>, it contains a web service, which mounts a folder locally so that upon any code change <code>watchmedo</code> restarts the <code>webapp</code> django server. It's a reverse proxy with nginx. </p>
  
  <pre><code>version: '3'
  services:
    webapp:
      build:
        context: .
        dockerfile: ./web/Dockerfile
      volumes:
        - ./web/:/usr/src/app/
        - staticfile_volume:/usr/src/app/public
      entrypoint: &gt;
        watchmedo auto-restart --recursive 
          --pattern="*.py" --directory="." 
            gunicorn myapp.wsgi:application -- --bind 0.0.0.0:9000
    nginx:
      build:
        context: .
        dockerfile: ./nginx/Dockerfile
      depends_on:
        - webapp
      volumes:
        - staticfile_volume:/usr/src/app/public
  volumes:
    staticfile_volume:
  </code></pre>
  
  <p>My local file setup is like:</p>
  
  <pre><code>$ tree -L 2
  .
  ├── docker-compose.yml
  ├── nginx
  │   ├── Dockerfile
  │   └── nginx.conf
  └── web
     ├── Dockerfile
     ├── manage.py
     ├── myapp
     ├── public
     └── static
  </code></pre>
  
  <p>But when I create a new file in <code>web/public</code> (the same folder mounted as a shared volume between <code>webapp</code> and <code>nginx</code> services), I don't see it from inside the running <code>webapp</code> container. </p>
  
  <p>Yet, if I create a new file anywhere else in the <code>web/</code> folder (which is also mounted as a separate volume), I see the change from inside the running <code>webapp</code> container. </p>
  
  <p>What is causing this? And how do I change this behavior?</p>
  
  <p>(I need to be able to run <code>python manage.py collectstatic</code> from inside the running container but output into my local hard drive's <code>web/public</code> so I can build the production Docker images for deploy.)</p>