title: How to share build app directory with nginx directory path with docker compose
body: <p>I have a react app, which creates a build folder as path <code>/app/admin/build</code> and I want this directory to share as volume to the other nginx container that is running as mentioned in my docker-compose.yaml below. Am I missing anything? I want to share the app build directory to nginx.
  However, <code>/var/www/admin/build</code> is getting created when checked login into the container but its empty. Can anyone help with this?</p>
  <p><code>Error: *1 directory index of &quot;/app/admin/build/&quot; is forbidden, client: 172.18.x.x, server: _, request: &quot;GET / HTTP/1.1&quot;, host: &quot;localhost&quot;</code></p>
  <p>Thanks in advance</p>
  <pre><code>version: '3'
  services:
    admin:
      build:
        dockerfile: Dockerfile
        context: ./admin
      volumes:
        - /app/admin/build
    web:
      restart: always
      build:
        dockerfile: Dockerfile
        context: ./nginx
      ports:
        - '80:3000'
      volumes:
        - /app/admin/build:/var/www/admin/build
  </code></pre>