title: Rename docker-compose project without deleting volumes
body: <p>I want to rename a docker-compose project (i.e by renaming the directory or adding <code>-p new_name</code> to docker-compose). If I do so I'll remove all my old containers and also all my old volumes. Is there a way to keep the volumes and attach them to the new docker-compose container?</p>
  <p>Example <code>docker-compose.yml</code></p>
  <pre class="lang-yaml prettyprint-override"><code>version: '3'
  
  services:
    dashboard:
      build: custom_dashboard
      volumes:
        - dashboard:/var/lib/grafana
      ports:
        - 3000:3000
  volumes:
    dashboard:
  </code></pre>
  <p>The project name (and the directory name) was <code>web</code> and I want to change it to <code>grafana</code>. The Volume name was <code>web_dashboard</code> and will be <code>grafana_dashboard</code>.</p>
  <p>I may could do it manually but I have a very huge docker-compose (but <a href="https://blog.software-craftsmen.at/blog/2017/docker-compose-best-practices-1.html" rel="noreferrer">modularized</a>) file with about 30 applications.</p>